diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbb9647f6..d78e7488b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,11 @@ name: build on: + release: + types: [created] push: branches: - main - tags: - - "v*" # Triggers on version tags like v1.0.0 pull_request: branches: - main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fece0538f..48e96e9c1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,7 +46,7 @@ jobs: cache-to: type=gha,mode=max - name: build and push docker image (push branch) - if: ${{ github.event.workflow_run.event == 'push' && !startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.event.workflow_run.event == 'push' }} uses: docker/build-push-action@v3 with: push: true @@ -58,7 +58,7 @@ jobs: cache-to: type=gha,mode=max - name: build and push docker image (push tag) - if: ${{ github.event.workflow_run.event == 'push' && startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.event.workflow_run.event == 'release' }} uses: docker/build-push-action@v3 with: push: true