mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
plugin: use gh token for plugin workflow (#21505)
This commit is contained in:
parent
1a780d8380
commit
3e60da075b
1 changed files with 6 additions and 0 deletions
6
.github/workflows/plugin-update-check.yml
vendored
6
.github/workflows/plugin-update-check.yml
vendored
|
|
@ -30,6 +30,10 @@ jobs:
|
|||
- run: echo "would use $COMMIT_SHA of $REPO_NAME"
|
||||
# checkout
|
||||
- uses: actions/checkout@v3 # should be a sha, but eh
|
||||
with:
|
||||
# We don't use the default token so that checks are executed on the resulting PR
|
||||
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
|
||||
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||
# activate go
|
||||
- uses: actions/setup-go@v4
|
||||
- name: update plugin
|
||||
|
|
@ -50,6 +54,8 @@ jobs:
|
|||
git push -f origin ${{ github.ref_name }}:"$BRANCH_NAME"
|
||||
- name: Open pull request if needed
|
||||
if: steps.changes.outputs.count > 0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.ELEVATED_GITHUB_TOKEN}}
|
||||
# Only open a PR if the branch is not attached to an existing one
|
||||
run: |
|
||||
PR=$(gh pr list --head "$BRANCH_NAME" --json number -q '.[0].number')
|
||||
|
|
|
|||
Loading…
Reference in a new issue