Skip to content

Commit

Permalink
ci: use github secrets for GH token (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 12, 2024
1 parent 976f819 commit 2284ecf
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/pre-post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,16 @@ jobs:
- validate-tag
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
steps:
- uses: elastic/apm-pipeline-library/.github/actions/github-token@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}

- uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
with:
username: ${{ env.GIT_USER }}
email: ${{ env.GIT_EMAIL }}
token: ${{ env.GITHUB_TOKEN }}

- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
token: ${{ env.GITHUB_TOKEN }}

- uses: elastic/oblt-actions/git/setup@v1

- name: Create the release tag (post phase)
if: inputs.phase == 'post'
run: |
Expand Down Expand Up @@ -100,3 +92,5 @@ jobs:
- name: Create the ${{ inputs.phase }} release PR
run: gh pr create --title="${{ inputs.pr_title }}" --base main --head ${{ env.BRANCH_NAME }} -b "${{ inputs.pr_body }}"
env:
GH_TOKEN: ${{ env.GITHUB_TOKEN }}

0 comments on commit 2284ecf

Please sign in to comment.