Skip to content

Commit 9250f4c

Browse files
committed
fix(docker): Fix docker tag for alpine build
This commit is to avoid tag overriding due to parallel build for multiple base images (e.g. debian and alpine). Closes golangci#1483 golangci#1486 Signed-off-by: Tam Mach <[email protected]>
1 parent 0b24526 commit 9250f4c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/tag.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ jobs:
5656
echo ::set-output name=major_tag::${MAJOR}
5757
echo ::set-output name=short_commit::${SHORT_COMMIT}
5858
echo ::set-output name=date::${DATE}
59+
if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then
60+
echo ::set-output name=full_tag_name::${TAG}-alpine
61+
echo ::set-output name=full_major_tag::${MAJOR}-alpine
62+
echo ::set-output name=latest_tag::latest-alpine
63+
else
64+
echo ::set-output name=full_tag_name::${TAG}
65+
echo ::set-output name=full_major_tag::${MAJOR}
66+
echo ::set-output name=latest_tag::latest
67+
fi
5968
6069
- name: Set up QEMU
6170
uses: docker/setup-qemu-action@v1
@@ -78,6 +87,6 @@ jobs:
7887
SHORT_COMMIT=${{ steps.prepare.outputs.short_commit }}
7988
DATE=${{ steps.prepare.outputs.date }}
8089
tags: |
81-
golangci/golangci-lint:${{ steps.prepare.outputs.tag_name }}
82-
golangci/golangci-lint:${{ steps.prepare.outputs.major_tag }}
83-
golangci/golangci-lint:latest
90+
golangci/golangci-lint:${{ steps.prepare.outputs.full_tag_name }}
91+
golangci/golangci-lint:${{ steps.prepare.outputs.full_major_tag }}
92+
golangci/golangci-lint:${{ steps.prepare.outputs.latest_tag }}

0 commit comments

Comments
 (0)