Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
workflow_dispatch:
workflow_call:
inputs:
force:
required: true
type: boolean
ref:
required: true
type: string
Expand All @@ -33,41 +30,41 @@

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:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
- name: Checkout libmongocrypt
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.ref }}
persist-credentials: false

- uses: actions/setup-python@v5
with:
python-version: 3.8
cache: 'pip'
cache-dependency-path: 'bindings/python/pyproject.toml'
allow-prereleases: true

- name: Build and test dist files
run: |
export LIBMONGOCRYPT_VERSION=$(cat ./libmongocrypt-version.txt)
git fetch origin $LIBMONGOCRYPT_VERSION
bash ./release.sh

- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: ./bindings/python/dist/*.*
if-no-files-found: error

collect_dist:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: ubuntu-latest
needs: [build_dist]
name: Collect dist files
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
Loading