Merge pull request #17058 from yonasberhe23/fix_oidc_provider_test_fa… #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update e2e Rancher Version | |
| on: | |
| push: | |
| branches: | |
| - 'release-*' | |
| jobs: | |
| update-e2e-version: | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| actions: write | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| if: github.event.created && startsWith(github.ref, 'refs/heads/release-') | |
| steps: | |
| - name: Read secrets | |
| uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3 | |
| with: | |
| secrets: | | |
| secret/data/github/repo/${{ github.repository }}/github/app-credentials appId | APPID; | |
| secret/data/github/repo/${{ github.repository }}/github/app-credentials privateKey | PRIVATEKEY | |
| - name: Generate Token | |
| id: generate-token | |
| uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 | |
| with: | |
| app-id: ${{ env.APPID }} | |
| private-key: ${{ env.PRIVATEKEY }} | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| ref: ${{ github.ref }} | |
| fetch-depth: 0 | |
| - name: Run update script | |
| run: ./scripts/update-e2e-rancher-version.sh | |
| shell: bash | |
| - name: Create Pull Request | |
| env: | |
| APP_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| run: | | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| BRANCH_NAME="${{ github.ref_name }}" | |
| NEW_BRANCH="update-e2e-test-version-${BRANCH_NAME}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" | |
| git checkout -b $NEW_BRANCH | |
| git add . | |
| git commit -m "Update e2e test version for ${BRANCH_NAME}" | |
| git push -u origin $NEW_BRANCH | |
| gh pr create \ | |
| --base "${BRANCH_NAME}" \ | |
| --head "$NEW_BRANCH" \ | |
| --title "Update e2e test version for ${BRANCH_NAME}" \ | |
| --body "This is an automated request to update e2e test versions in the release branch by @${GITHUB_ACTOR}." |