Skip to content

Commit 1aeb48d

Browse files
authored
[BRE-831] migrate secrets AKV (#87)
1 parent 39eb9ff commit 1aeb48d

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/cd.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ on:
66

77
jobs:
88
publish:
9-
runs-on: ubuntu-latest
9+
name: Publish
10+
runs-on: ubuntu-24.04
1011
permissions:
1112
contents: read
1213
packages: write
14+
id-token: write
1315
steps:
14-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
- name: Checkout Repo
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1518
- name: Install poetry
1619
run: pipx install poetry
1720
- name: Set up Python
@@ -23,7 +26,21 @@ jobs:
2326
run: poetry env use 3.9
2427
- name: Environment information
2528
run: poetry env info
29+
- name: Log in to Azure
30+
uses: bitwarden/gh-actions/azure-login@main
31+
with:
32+
subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33+
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
34+
client_id: ${{ secrets.AZURE_CLIENT_ID }}
35+
- name: Get Azure Key Vault secrets
36+
id: get-kv-secrets
37+
uses: bitwarden/gh-actions/get-keyvault-secrets@main
38+
with:
39+
keyvault: gh-passwordless-python
40+
secrets: "PYPI-TOKEN"
41+
- name: Log out from Azure
42+
uses: bitwarden/gh-actions/azure-logout@main
2643
- name: Configure PYPI
27-
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
44+
run: poetry config pypi-token.pypi ${{ steps.get-kv-secrets.outputs.PYPI-TOKEN }}
2845
- name: Publish to PYPI
2946
run: poetry publish --build

0 commit comments

Comments
 (0)