Skip to content

Commit 70ebf8b

Browse files
authored
Use ephemeral Github token (#3071)
1 parent 90fcfee commit 70ebf8b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/backport.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
)
2323
)
2424
steps:
25-
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
25+
- name: Fetch ephemeral GitHub token
26+
id: fetch-token
27+
uses: elastic/ci-gh-actions/fetch-github-token@8a7604dfdd4e7fe21f969bfe9ff96e17635ea577 # v1.0.0
2628
with:
27-
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
vault-instance: "ci-prod"
30+
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
31+
with:
32+
github_token: ${{ steps.fetch-token.outputs.token }}

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
tag=$(echo "$tag_meta" | cut -d '.' -f1)
4545
npm publish --provenance --access public --tag "$tag"
4646
fi
47+
- name: Fetch ephemeral GitHub token
48+
id: fetch-token
49+
uses: elastic/ci-gh-actions/fetch-github-token@8a7604dfdd4e7fe21f969bfe9ff96e17635ea577 # v1.0.0
50+
with:
51+
vault-instance: "ci-prod"
4752
- name: Publish version on GitHub
4853
run: |
4954
version=$(jq -r .version package.json)
@@ -66,4 +71,4 @@ jobs:
6671
fi
6772
env:
6873
BRANCH_NAME: ${{ github.event.inputs.branch }}
69-
GH_TOKEN: ${{ github.token }}
74+
GH_TOKEN: ${{ steps.fetch-token.outputs.token }}

0 commit comments

Comments
 (0)