Skip to content

Commit e3586ec

Browse files
authored
[BRE-228] - Configure Git to Use Devops Bot PAT During the First Checkout (#15)
* configure git to use devops bot pat during the first checkout * remove gh token env var
1 parent 6674a9f commit e3586ec

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.github/workflows/cd.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,25 @@ jobs:
2020
outputs:
2121
version: ${{ steps.get-version.outputs.version }}
2222
steps:
23+
- name: Login to Azure - CI Subscription
24+
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
25+
with:
26+
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
27+
28+
- name: Retrieve secrets
29+
id: retrieve-secrets
30+
uses: bitwarden/gh-actions/get-keyvault-secrets@main
31+
with:
32+
keyvault: "bitwarden-ci"
33+
secrets: "github-gpg-private-key,
34+
github-gpg-private-key-passphrase,
35+
github-pat-bitwarden-devops-bot-repo-scope"
36+
2337
- name: Check out repo
2438
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
39+
with:
40+
fetch-depth: 0
41+
token: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
2542

2643
- name: Set up Python
2744
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
@@ -43,20 +60,6 @@ jobs:
4360
VERSION=$(hatch version)
4461
echo "version=$VERSION" >> $GITHUB_OUTPUT
4562
46-
- name: Login to Azure - CI Subscription
47-
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
48-
with:
49-
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
50-
51-
- name: Retrieve secrets
52-
id: retrieve-secrets
53-
uses: bitwarden/gh-actions/get-keyvault-secrets@main
54-
with:
55-
keyvault: "bitwarden-ci"
56-
secrets: "github-gpg-private-key,
57-
github-gpg-private-key-passphrase,
58-
github-pat-bitwarden-devops-bot-repo-scope"
59-
6063
- name: Import GPG key
6164
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
6265
with:

0 commit comments

Comments
 (0)