From 52d26a3b727ac647f3164242b30f1501ac359e20 Mon Sep 17 00:00:00 2001 From: Tam Mach Date: Tue, 3 Nov 2020 12:06:19 +1100 Subject: [PATCH] fix(docker): Fix docker tag for alpine build (#1487) 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 --- .github/workflows/tag.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 8184e2c9778c..d30f777140c0 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -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 @@ -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 }}