File tree Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change 11name : CI
22permissions :
33 contents : read
4- issues : write
54
65on :
76 push :
2322 id-token : write
2423 actions : read
2524 uses : ./.github/workflows/release.yaml
25+ secrets :
26+ VAULT_URL : ${{ secrets.VAULT_URL }}
2627
2728 notify-failure :
2829 if : |
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: release
22
33on :
44 workflow_call :
5+ secrets :
6+ VAULT_URL :
7+ required : true
58
69jobs :
710 release :
1114 id-token : write # Required for OIDC trusted publishing
1215 runs-on : ubuntu-latest
1316 steps :
17+ - name : ' Retrieve Secrets from Vault'
18+ id : vault
19+ uses : hashicorp/vault-action@v3.4.0
20+ with :
21+ url : ${{ secrets.VAULT_URL }}
22+ role : ${{ github.event.repository.name }}-github-action
23+ method : jwt
24+ path : github-actions
25+ exportEnv : false
26+ secrets : |
27+ github/token/${{ github.event.repository.name }}-semantic-release token | GITHUB_TOKEN;
28+
29+ - name : Get Automation Bot User ID
30+ id : get-user-id
31+ run : echo "user-id=$(gh api "/users/contentful-automation[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
32+ env :
33+ GITHUB_TOKEN : ${{ steps.vault.outputs.GITHUB_TOKEN }}
34+
35+ - name : Setting up Git User Credentials
36+ run : |
37+ git config --global user.name 'contentful-automation[bot]'
38+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+contentful-automation[bot]@users.noreply.github.com'
39+
1440 - name : Checkout code
1541 uses : actions/checkout@v5
1642 with :
3662 dist
3763 key : build-cache-${{ github.run_id }}-${{ github.run_attempt }}
3864
39- - name : Setup Chrome
40- uses : browser-actions/setup-chrome@v2
41- with :
42- install-chromedriver : true
43-
4465 - name : Run semantic release
45- run : npm run semantic-release
66+ run : npm run semantic-release
67+ env :
68+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments