Skip to content

Commit

Permalink
PYTHON-5047 Clean up workflow triggers (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Feb 5, 2025
1 parent facf082 commit 9cf395b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
pull_request:
paths:
- .github/workflows/*.yml
workflow_dispatch:
schedule:
- cron: '17 10 * * 2'

jobs:
analyze-python:
name: Analyze GitHub Actions
if: github.repository_owner == 'mongodb' || github.event_name == 'workflow_dispatch'
runs-on: "ubuntu-latest"
timeout-minutes: 360
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- .github/workflows/*python.yml
schedule:
- cron: '17 10 * * 2'
workflow_dispatch:
workflow_call:
inputs:
ref:
Expand All @@ -20,6 +21,7 @@ on:
jobs:
analyze-python:
name: Analyze Python
if: github.repository_owner == 'mongodb' || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
runs-on: "macos-latest"
timeout-minutes: 360
permissions:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/dist-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ on:
workflow_dispatch:
workflow_call:
inputs:
force:
required: true
type: boolean
ref:
required: true
type: string
Expand All @@ -33,7 +30,7 @@ defaults:

jobs:
build_dist:
if: github.repository_owner == 'mongodb' || inputs.force == true
if: github.repository_owner == 'mongodb' || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ defaults:
jobs:
pre-publish:
environment: release-python
if: github.repository_owner == 'mongodb' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down Expand Up @@ -65,7 +66,6 @@ jobs:
needs: [pre-publish]
uses: ./.github/workflows/dist-python.yml
with:
force: true
ref: ${{ needs.pre-publish.outputs.version }}

static-scan:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
zizmor:
name: zizmor latest via Cargo
if: github.repository_owner == 'mongodb'
runs-on: ubuntu-latest
permissions:
security-events: write
Expand Down

0 comments on commit 9cf395b

Please sign in to comment.