diff --git a/.github/workflows/atlantis-image.yml b/.github/workflows/atlantis-image.yml index 6ab98c9026..26a8767f44 100644 --- a/.github/workflows/atlantis-image.yml +++ b/.github/workflows/atlantis-image.yml @@ -3,10 +3,9 @@ name: atlantis-image on: push: branches: - - "master" - release: - types: - - "published" + - 'master' + tags: + - 'v*.*.*' workflow_dispatch: jobs: @@ -47,10 +46,10 @@ jobs: # Publish release to container registry - name: populate release version - if: ${{ github.event_name == 'release'}} + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Build and push atlantis:${{ env.RELEASE_VERSION }} image - if: ${{ github.event_name == 'release'}} + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} uses: docker/build-push-action@v2 with: context: .