1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-19 01:44:28 +00:00

Fix token for PR generation for CI invocation

This commit is contained in:
mitulshah-suse
2024-07-11 12:07:14 +05:30
parent 02e15d2e10
commit 97db2957ee

View File

@@ -16,6 +16,7 @@ env:
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
go-generate:
runs-on: ubuntu-latest
@@ -45,6 +46,11 @@ jobs:
git checkout -b "$BRANCH"
git commit -a -m 'go generate'
git push origin "$BRANCH"
- name: Retrieve token from vault
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/github-token/credentials token | PAT_TOKEN ;
- name: Create Pull Request
if: ${{ env.changes_exist == 'true' }}
id: cpr
@@ -52,7 +58,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ steps.branch.outputs.branch }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ env.PAT_TOKEN }}
script: |
let body = 'Auto-generated by GitHub Actions\n\n'
if ( `${ process.env.INPUT_SOURCE_URL }` ) {