Skip to content

Commit 1c2f1f5

Browse files
authored
PYTHON-4388 Fix dist handling in SSDLC workflow (mongodb#1705)
1 parent b820685 commit 1c2f1f5

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
# required for all workflows
2727
security-events: write
2828

29-
# required to fetch internal or private CodeQL packs
30-
packages: read
31-
3229
strategy:
3330
fail-fast: false
3431
matrix:

.github/workflows/dist.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
workflow_dispatch:
1111
pull_request:
1212
workflow_call:
13+
inputs:
14+
ref:
15+
required: true
16+
type: string
1317

1418
concurrency:
1519
group: dist-${{ github.ref }}
@@ -44,6 +48,7 @@ jobs:
4448
uses: actions/checkout@v4
4549
with:
4650
fetch-depth: 0
51+
ref: ${{ inputs.ref }}
4752

4853
- uses: actions/setup-python@v5
4954
with:
@@ -99,6 +104,7 @@ jobs:
99104
- uses: actions/checkout@v4
100105
with:
101106
fetch-depth: 0
107+
ref: ${{ inputs.ref }}
102108

103109
- uses: actions/setup-python@v5
104110
with:

.github/workflows/release-python.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
PRODUCT_NAME: PyMongo
2020
# Changes per branch
2121
SILK_ASSET_GROUP: mongodb-python-driver
22-
EVERGREEN_PROJECT: mongodb-python-driver
22+
EVERGREEN_PROJECT: mongo-python-driver
2323

2424
defaults:
2525
run:
@@ -32,6 +32,8 @@ jobs:
3232
permissions:
3333
id-token: write
3434
contents: write
35+
outputs:
36+
version: ${{ steps.pre-publish.outputs.version }}
3537
steps:
3638
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v2
3739
with:
@@ -44,19 +46,24 @@ jobs:
4446
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
4547
artifactory_username: ${{ vars.ARTIFACTORY_USERNAME }}
4648
- uses: mongodb-labs/drivers-github-tools/python/pre-publish@v2
49+
id: pre-publish
4750
with:
4851
version: ${{ inputs.version }}
4952
dry_run: ${{ inputs.dry_run }}
5053

5154
build-dist:
5255
needs: [pre-publish]
5356
uses: ./.github/workflows/dist.yml
57+
with:
58+
ref: ${{ needs.pre-publish.outputs.version }}
5459

5560
static-scan:
5661
needs: [pre-publish]
5762
uses: ./.github/workflows/codeql.yml
63+
permissions:
64+
security-events: write
5865
with:
59-
ref: ${{ github.ref }}
66+
ref: ${{ needs.pre-publish.outputs.version }}
6067

6168
publish:
6269
needs: [build-dist, static-scan]

0 commit comments

Comments
 (0)