diff --git a/.github/workflows/build_runner_image.yml b/.github/workflows/build_runner_image.yml index c0f4cacd86fe..0492622f8847 100644 --- a/.github/workflows/build_runner_image.yml +++ b/.github/workflows/build_runner_image.yml @@ -25,6 +25,7 @@ on: pull_request: branches: ['master'] paths: ['.github/gh-actions-self-hosted-runners/arc/images/**'] + workflow_dispatch: env: docker_registry: us-central1-docker.pkg.dev docker_repo: apache-beam-testing/beam-github-actions/beam-arc-runner @@ -41,6 +42,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - name: Authenticate on GCP + if: github.ref == 'refs/heads/master' uses: google-github-actions/setup-gcloud@v0 with: service_account_email: ${{ secrets.GCP_SA_EMAIL }} @@ -61,7 +63,7 @@ jobs: ${{env.docker_registry}}/${{env.docker_repo}}:latest ${{env.docker_registry}}/${{env.docker_repo}}:${{ github.sha }} - name: Push Docker image - if: github.event_name == 'push' + if: github.ref == 'refs/heads/master' id: docker_build uses: docker/build-push-action@v4 with: