diff --git a/.github/workflows/ci-stability.yaml b/.github/workflows/ci-stability.yaml index c5345bbd42d3..c55b78d1c0aa 100644 --- a/.github/workflows/ci-stability.yaml +++ b/.github/workflows/ci-stability.yaml @@ -20,15 +20,22 @@ jobs: trigger-ci: runs-on: ubuntu-latest steps: + - name: Generate GitHub app token + id: github-app-token + uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + token: ${{ steps.github-app-token.outputs.token }} - name: Get open pull requests and save to file run: | gh pr list --json number,labels > open_prs.json env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} - name: Process PRs id: process_prs run: | @@ -40,7 +47,7 @@ jobs: echo "pr_numbers_with_verify_stability=$pr_numbers_with_verify_stability" >> $GITHUB_OUTPUT echo "pr_numbers_with_verify_stability_merge_master=$pr_numbers_with_verify_stability_merge_master" >> $GITHUB_OUTPUT env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} - name: Merge master branch (if applicable) and push a single commit if: steps.process_prs.outputs.pr_numbers_with_verify_stability != '' run: | @@ -71,4 +78,4 @@ jobs: git push origin $pr_branch done env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }}