Skip to content

Commit

Permalink
Only auth and push on master branch (#29995)
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Jan 11, 2024
1 parent efd50ed commit 96d092b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build_runner_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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:
Expand Down

0 comments on commit 96d092b

Please sign in to comment.