1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-03 07:54:14 +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: permissions:
contents: write contents: write
pull-requests: write pull-requests: write
id-token: write
jobs: jobs:
go-generate: go-generate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -45,6 +46,11 @@ jobs:
git checkout -b "$BRANCH" git checkout -b "$BRANCH"
git commit -a -m 'go generate' git commit -a -m 'go generate'
git push origin "$BRANCH" 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 - name: Create Pull Request
if: ${{ env.changes_exist == 'true' }} if: ${{ env.changes_exist == 'true' }}
id: cpr id: cpr
@@ -52,7 +58,7 @@ jobs:
env: env:
SOURCE_BRANCH: ${{ steps.branch.outputs.branch }} SOURCE_BRANCH: ${{ steps.branch.outputs.branch }}
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ env.PAT_TOKEN }}
script: | script: |
let body = 'Auto-generated by GitHub Actions\n\n' let body = 'Auto-generated by GitHub Actions\n\n'
if ( `${ process.env.INPUT_SOURCE_URL }` ) { if ( `${ process.env.INPUT_SOURCE_URL }` ) {