From 14ed482eb70a5c3745fea3c2730e061ccb265b63 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 25 Jun 2024 16:38:04 -0500 Subject: [PATCH] PYTHON-4388 [v4.8] Fix dist handling in SSDLC workflow (#1706) --- .github/workflows/dist.yml | 6 ++++++ .github/workflows/release-python.yml | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 8ac1d00a6b..7ec55dd3b3 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -10,6 +10,10 @@ on: workflow_dispatch: pull_request: workflow_call: + inputs: + ref: + required: true + type: string concurrency: group: dist-${{ github.ref }} @@ -44,6 +48,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ inputs.ref }} - uses: actions/setup-python@v5 with: @@ -99,6 +104,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ inputs.ref }} - uses: actions/setup-python@v5 with: diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index b41c760cfe..da8a3db0ac 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -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: @@ -44,6 +46,7 @@ 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 }} @@ -51,12 +54,14 @@ jobs: 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 with: - ref: ${{ github.ref }} + ref: ${{ needs.pre-publish.outputs.version }} publish: needs: [build-dist, static-scan]