1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 06:34:03 +00:00

Merge pull request #3634 from mitulshah-suse/move-to-gha-1.6

Fix token for PR generation for CI invocation
This commit is contained in:
mitulshah-suse
2024-08-07 12:10:40 +05:30
committed by GitHub

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 }` ) {