Skip to content

Commit ea89395

Browse files
authored
feat(EN-2932): Migrate github secrets to vault (#41)
# Description This PR has been generated with claude, please be aware. Removing the use of github secrets (`secrets.*`) by vault secrets accordingly to [STEP-18](https://doctolib.atlassian.net/wiki/spaces/SEC/pages/1337655664/STEP+18+-+Github+Actions+Secrets+Security). You can get more documentation following [this doc](https://doctolib.atlassian.net/wiki/spaces/SEC/pages/1572440355/Github+Actions+-+Secrets+Management#How-to-use-secrets-in-your-workflow) # Context EN-2932
1 parent 0bda91c commit ea89395

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/ci-secrets.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
secrets:
2+
common:
3+
- path: terraform/github/actions/terraform-provider-postgresql/common
4+
version: 0
5+
- path: common/github/actions/terraform-provider-postgresql/to_be_classified
6+
version: 1

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,22 @@ on:
1414
push:
1515
tags:
1616
- 'v*'
17+
18+
permissions:
19+
contents: read
20+
id-token: write
21+
1722
jobs:
1823
goreleaser:
1924
runs-on: ubuntu-latest
2025
steps:
2126
-
2227
name: Checkout
2328
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29+
- name: Load Secrets
30+
uses: doctolib/actions/load-secrets@main
31+
with:
32+
prefix_secrets: true
2433
-
2534
name: Unshallow
2635
run: git fetch --prune --unshallow
@@ -35,8 +44,8 @@ jobs:
3544
uses: crazy-max/ghaction-import-gpg@d6f3f49f3345e29369fe57596a3ca8f94c4d2ca7 # v5
3645
with:
3746
# These secrets will need to be configured for the repository:
38-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
39-
passphrase: ${{ secrets.PASSPHRASE }}
47+
gpg_private_key: ${{ env.VAULT_SECRET_GPG_PRIVATE_KEY }}
48+
passphrase: ${{ env.VAULT_SECRET_PASSPHRASE }}
4049
-
4150
name: Run GoReleaser
4251
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6
@@ -46,4 +55,4 @@ jobs:
4655
env:
4756
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
4857
# GitHub sets this automatically
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)