Skip to content

Commit

Permalink
Restrict workflows to run on apache/beam (#29133)
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Oct 25, 2023
1 parent 8b31859 commit e4aef8c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/beam_MetricsCredentialsRotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ env:
jobs:
beam_MetricsCredentialsRotation:
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule'
(github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule') &&
github.repository == 'apache/beam'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 100
name: ${{ matrix.job_name }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/beam_Metrics_Report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ jobs:
job_name: [beam_Metrics_Report]
job_phrase: [Run Metrics Report]
if: |
github.event_name == 'schedule' ||
(github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event.comment.body == 'Run Metrics Report'
github.event.comment.body == 'Run Metrics Report') &&
github.repository == 'apache/beam'
steps:
- uses: actions/checkout@v3
- name: Setup repository
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/beam_PostCommit_BeamMetrics_Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ env:
jobs:
beam_PostCommit_BeamMetrics_Publish:
if: |
github.event_name == 'push' ||
(github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
github.event.comment.body == 'Run Beam Metrics Deployment'
github.event.comment.body == 'Run Beam Metrics Deployment') &&
github.repository == 'apache/beam'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 100
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/beam_Publish_Beam_SDK_Snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ env:
jobs:
beam_Publish_Beam_SDK_Snapshots:
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule'
(github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule') &&
github.repository == 'apache/beam'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 100
name: ${{ matrix.job_name }} (${{ matrix.container_task }})
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/beam_Publish_Docker_Snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ env:
jobs:
beam_Publish_Docker_Snapshots:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
github.event.comment.body == 'Publish Docker Snapshots'
github.event.comment.body == 'Publish Docker Snapshots') &&
github.repository == 'apache/beam'
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 100
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/beam_Release_NightlySnapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ jobs:
job_name: [beam_Release_NightlySnapshot]
job_phrase: [Release Nightly Snapshot]
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule'
(github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule') &&
github.repository == 'apache/beam'
steps:
- uses: actions/checkout@v4
- name: Setup repository
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/beam_Release_Python_NightlySnapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ jobs:
matrix:
job_name: [beam_Release_Python_NightlySnapshot]
job_phrase: [Release Nightly Snapshot Python]
if: github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule'
if: (github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule') &&
github.repository == 'apache/beam'

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_runner_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
docker_repo: apache-beam-testing/beam-github-actions/beam-arc-runner
jobs:
build-and-version-runner:
if: github.repository == 'apache/beam'
env:
working-directory: .github/gh-actions-self-hosted-runners/arc/images/
runs-on: [self-hosted, ubuntu-20.04]
Expand Down

0 comments on commit e4aef8c

Please sign in to comment.