Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON-4388 Fix dist handling in SSDLC workflow #1705

Merged
merged 3 commits into from
Jun 26, 2024
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
3 changes: 0 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
workflow_dispatch:
pull_request:
workflow_call:
inputs:
ref:
required: true
type: string

concurrency:
group: dist-${{ github.ref }}
Expand Down Expand Up @@ -44,6 +48,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.ref }}

- uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -99,6 +104,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.ref }}

- uses: actions/setup-python@v5
with:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
PRODUCT_NAME: PyMongo
# Changes per branch
SILK_ASSET_GROUP: mongodb-python-driver
EVERGREEN_PROJECT: mongodb-python-driver
EVERGREEN_PROJECT: mongo-python-driver

defaults:
run:
Expand All @@ -32,6 +32,8 @@ jobs:
permissions:
id-token: write
contents: write
outputs:
version: ${{ steps.pre-publish.outputs.version }}
steps:
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v2
with:
Expand All @@ -44,19 +46,24 @@ jobs:
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
artifactory_username: ${{ vars.ARTIFACTORY_USERNAME }}
- uses: mongodb-labs/drivers-github-tools/python/pre-publish@v2
id: pre-publish
with:
version: ${{ inputs.version }}
dry_run: ${{ inputs.dry_run }}

build-dist:
needs: [pre-publish]
uses: ./.github/workflows/dist.yml
with:
ref: ${{ needs.pre-publish.outputs.version }}

static-scan:
needs: [pre-publish]
uses: ./.github/workflows/codeql.yml
permissions:
security-events: write
with:
ref: ${{ github.ref }}
ref: ${{ needs.pre-publish.outputs.version }}

publish:
needs: [build-dist, static-scan]
Expand Down
Loading