Skip to content

Commit

Permalink
chore: read tokens from Akeyeless
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetomir committed May 15, 2023
1 parent e3cc039 commit 82c02de
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Import Secrets
id: import-secrets
uses: LanceMcCarthy/akeyless-action@v3
with:
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
static-secrets: |
{
"/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN",
"/WebComponents/prod/tokens/PROGRESS_NPM_REGISTRY_TOKEN": "NPM_TOKEN"
}
export-secrets-to-environment: false

- name: Check out branch
uses: actions/checkout@v2
with:
Expand All @@ -33,6 +45,6 @@ jobs:
- name: Publish release
run: ./.github/workflows/scripts/ci-semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ steps.import-secrets.outputs.NPM_TOKEN }}
GH_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}

11 changes: 9 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Import Secrets
id: import-secrets
uses: LanceMcCarthy/akeyless-action@v3
with:
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
static-secrets: '{ "/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN" }'
export-secrets-to-environment: false

- name: Check out master
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0 # Fetch all branches
token: ${{ secrets.GH_TOKEN }}
token: ${{ steps.import-secrets.outputs.GH_TOKEN }}

- name: Install modules
run: npm install @telerik/semantic-prerelease@1 --no-save

- name: Fast-forward master to develop
run: npx release-master

0 comments on commit 82c02de

Please sign in to comment.