fix: use GitHub App token instead of PAT

This commit is contained in:
2025-11-27 16:34:39 +03:00
parent dd85b07f31
commit abc18af23c
+10 -1
View File
@@ -23,10 +23,19 @@ jobs:
stop-workflows:
runs-on: ubuntu-latest
steps:
- name: Generate App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_APP_ID }}
private-key: ${{ secrets.WORKFLOW_STOPPER_APP_KEY }}
owner: pezkuwichain
repositories: pezkuwi-sdk
- name: Cancel running workflows
uses: actions/github-script@v7
with:
github-token: ${{ secrets.WORKFLOW_STOPPER_TOKEN }}
github-token: ${{ steps.app-token.outputs.token }}
script: |
const [owner, repo] = '${{ github.event.inputs.github_repository }}'.split('/');
const sha = '${{ github.event.inputs.github_sha }}';