Skip to content

Commit 14ed482

Browse files
authored
PYTHON-4388 [v4.8] Fix dist handling in SSDLC workflow (#1706)
1 parent 94de52a commit 14ed482

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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,22 @@ 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
5863
with:
59-
ref: ${{ github.ref }}
64+
ref: ${{ needs.pre-publish.outputs.version }}
6065

6166
publish:
6267
needs: [build-dist, static-scan]

0 commit comments

Comments
 (0)