Skip to content

Commit fe44f68

Browse files
committed
add base job in workflow
1 parent 1b0f7b8 commit fe44f68

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,31 @@ jobs:
881881
fi
882882
gecho ""
883883
884+
- name: Generate the docker manifest
885+
if: |
886+
inputs.release-custom-file == false &&
887+
inputs.release-type == 'program' &&
888+
inputs.release-docker == true
889+
working-directory: ${{ inputs.working-directory }}
890+
shell: bash
891+
run: |
892+
# check for config-breaking set if input params
893+
if [[ (${{ inputs.release-arch-arm64 }} == "false" ) && (${{ inputs.release-arch-arm64 == "false") ]]; then
894+
echo "error condition: release-docker must include either release-arch-arm64 and/or arm64, both are false"
895+
exit -1
896+
fi
897+
898+
gecho() { echo "$1" >> .goreleaser.yml ; }
899+
gecho "docker_manifests:"
900+
gecho " - name_template: ghcr.io/${{ github.repository }}:{{ .Tag }}"
901+
gecho " image_templates:"
902+
if [[ "${{ inputs.release-arch-amd64 }}" == "true" ]]; then
903+
gecho " - ghcr.io/${{ github.repository }}-amd64:{{ .Tag }}"
904+
fi
905+
if [[ "${{ inputs.release-arch-arm64 }}" == "true" ]]; then
906+
gecho " - ghcr.io/${{ github.repository }}-arm64:{{ .Tag }}"
907+
fi
908+
884909
- name: Determine project license(s)
885910
if: |
886911
inputs.release-custom-file == false &&

0 commit comments

Comments
 (0)