Skip to content

Commit dcb4a02

Browse files
committed
chore: read secrets from Akeyeless
1 parent ca343f5 commit dcb4a02

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.github/workflows/cd.yml

Lines changed: 21 additions & 3 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

@@ -26,5 +44,5 @@ jobs:
2644
- name: Publish release
2745
run: ./.github/workflows/release.sh
2846
env:
29-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
47+
NPM_TOKEN: ${{ steps.import-secrets.outputs.NPM_TOKEN }}
48+
GH_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1519
steps:
1620
- name: Check out repository
17-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
1822

1923
- name: Install modules
2024
run: npm install --no-audit --ignore-scripts

.github/workflows/publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ 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:
1419
- name: Check out master
15-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
1621
with:
1722
fetch-depth: 0 # Fetch all branches
18-
token: ${{ secrets.GH_TOKEN }}
23+
token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
1924

2025
- name: Fast-forward master to develop
2126
run: ./.github/workflows/ff-master.sh
22-

0 commit comments

Comments
 (0)