Skip to content

Commit 9cf395b

Browse files
authored
PYTHON-5047 Clean up workflow triggers (#950)
1 parent facf082 commit 9cf395b

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

.github/workflows/codeql-actions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on:
77
pull_request:
88
paths:
99
- .github/workflows/*.yml
10+
workflow_dispatch:
1011
schedule:
1112
- cron: '17 10 * * 2'
1213

1314
jobs:
1415
analyze-python:
1516
name: Analyze GitHub Actions
17+
if: github.repository_owner == 'mongodb' || github.event_name == 'workflow_dispatch'
1618
runs-on: "ubuntu-latest"
1719
timeout-minutes: 360
1820
permissions:

.github/workflows/codeql-python.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- .github/workflows/*python.yml
1212
schedule:
1313
- cron: '17 10 * * 2'
14+
workflow_dispatch:
1415
workflow_call:
1516
inputs:
1617
ref:
@@ -20,6 +21,7 @@ on:
2021
jobs:
2122
analyze-python:
2223
name: Analyze Python
24+
if: github.repository_owner == 'mongodb' || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
2325
runs-on: "macos-latest"
2426
timeout-minutes: 360
2527
permissions:

.github/workflows/dist-python.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ on:
1515
workflow_dispatch:
1616
workflow_call:
1717
inputs:
18-
force:
19-
required: true
20-
type: boolean
2118
ref:
2219
required: true
2320
type: string
@@ -33,7 +30,7 @@ defaults:
3330

3431
jobs:
3532
build_dist:
36-
if: github.repository_owner == 'mongodb' || inputs.force == true
33+
if: github.repository_owner == 'mongodb' || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
3734
runs-on: ${{ matrix.os }}
3835
strategy:
3936
matrix:

.github/workflows/release-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ defaults:
3535
jobs:
3636
pre-publish:
3737
environment: release-python
38+
if: github.repository_owner == 'mongodb' || github.event_name == 'workflow_dispatch'
3839
runs-on: ubuntu-latest
3940
permissions:
4041
id-token: write
@@ -65,7 +66,6 @@ jobs:
6566
needs: [pre-publish]
6667
uses: ./.github/workflows/dist-python.yml
6768
with:
68-
force: true
6969
ref: ${{ needs.pre-publish.outputs.version }}
7070

7171
static-scan:

.github/workflows/zizmor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
zizmor:
1111
name: zizmor latest via Cargo
12+
if: github.repository_owner == 'mongodb'
1213
runs-on: ubuntu-latest
1314
permissions:
1415
security-events: write

0 commit comments

Comments
 (0)