mirror of
https://github.com/pezkuwichain/workflow-stopper.git
synced 2026-04-21 23:47:58 +00:00
fix: use GitHub App token instead of PAT
This commit is contained in:
@@ -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 }}';
|
||||
|
||||
Reference in New Issue
Block a user