Skip to content

Commit 64db9ef

Browse files
committed
chore: read secrets from Akeyeless
1 parent 48ec308 commit 64db9ef

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

.github/workflows/cd.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,28 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
environment: upload
17+
18+
permissions:
19+
id-token: write # Required by Akeyless
20+
contents: read
21+
packages: read
1622

1723
steps:
24+
- name: Import Secrets
25+
id: import-secrets
26+
uses: LanceMcCarthy/akeyless-action@v3
27+
with:
28+
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
29+
static-secrets: |
30+
{
31+
"/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN",
32+
"/WebComponents/prod/tokens/PROGRESS_NPM_REGISTRY_TOKEN": "NPM_TOKEN"
33+
}
34+
export-secrets-to-environment: false
35+
1836
- name: Check out branch
19-
uses: actions/checkout@v2
37+
uses: actions/checkout@v3
2038
with:
2139
fetch-depth: 0 # Fetch all branches
2240

@@ -37,6 +55,5 @@ jobs:
3755
- name: Publish release
3856
run: npx ci-semantic-release
3957
env:
40-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
42-
58+
NPM_TOKEN: ${{ steps.import-secrets.outputs.NPM_TOKEN }}
59+
GH_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414

15-
steps:
16-
- name: Cancel previous runs
17-
uses: styfle/[email protected]
18-
with:
19-
access_token: ${{ github.token }}
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
2018

19+
steps:
2120
- name: Check out repository
2221
uses: actions/checkout@v2
2322

.github/workflows/publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,26 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

13+
permissions:
14+
id-token: write # Required by Akeyless
15+
contents: read
16+
packages: read
17+
1318
steps:
19+
- name: Import Secrets
20+
id: import-secrets
21+
uses: LanceMcCarthy/akeyless-action@v3
22+
with:
23+
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
24+
static-secrets: '{ "/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN" }'
25+
export-secrets-to-environment: false
26+
1427
- name: Check out master
15-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
1629
with:
1730
ref: master
1831
fetch-depth: 0 # Fetch all branches
19-
token: ${{ secrets.GH_TOKEN }}
32+
token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
2033

2134
- name: Set up Node.js
2235
uses: actions/setup-node@v2

0 commit comments

Comments
 (0)