Skip to content

Commit

Permalink
fix(docker): Fix docker tag for alpine build (golangci#1487)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sayboras authored Nov 3, 2020
1 parent 0b24526 commit 52d26a3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ jobs:
echo ::set-output name=major_tag::${MAJOR}
echo ::set-output name=short_commit::${SHORT_COMMIT}
echo ::set-output name=date::${DATE}
if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then
echo ::set-output name=full_tag_name::${TAG}-alpine
echo ::set-output name=full_major_tag::${MAJOR}-alpine
echo ::set-output name=latest_tag::latest-alpine
else
echo ::set-output name=full_tag_name::${TAG}
echo ::set-output name=full_major_tag::${MAJOR}
echo ::set-output name=latest_tag::latest
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand All @@ -78,6 +87,6 @@ jobs:
SHORT_COMMIT=${{ steps.prepare.outputs.short_commit }}
DATE=${{ steps.prepare.outputs.date }}
tags: |
golangci/golangci-lint:${{ steps.prepare.outputs.tag_name }}
golangci/golangci-lint:${{ steps.prepare.outputs.major_tag }}
golangci/golangci-lint:latest
golangci/golangci-lint:${{ steps.prepare.outputs.full_tag_name }}
golangci/golangci-lint:${{ steps.prepare.outputs.full_major_tag }}
golangci/golangci-lint:${{ steps.prepare.outputs.latest_tag }}

0 comments on commit 52d26a3

Please sign in to comment.