Skip to content

Commit

Permalink
fix(docker): Fix docker tag for alpine build (#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 #1483 #1486

Signed-off-by: Tam Mach <sayboras@yahoo.com>
  • Loading branch information
sayboras committed 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
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.