mirror of
https://github.com/pezkuwichain/workflow-stopper.git
synced 2026-06-14 07:31:07 +00:00
fix: use GitHub App token instead of PAT
This commit is contained in:
@@ -23,10 +23,19 @@ jobs:
|
|||||||
stop-workflows:
|
stop-workflows:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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
|
- name: Cancel running workflows
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.WORKFLOW_STOPPER_TOKEN }}
|
github-token: ${{ steps.app-token.outputs.token }}
|
||||||
script: |
|
script: |
|
||||||
const [owner, repo] = '${{ github.event.inputs.github_repository }}'.split('/');
|
const [owner, repo] = '${{ github.event.inputs.github_repository }}'.split('/');
|
||||||
const sha = '${{ github.event.inputs.github_sha }}';
|
const sha = '${{ github.event.inputs.github_sha }}';
|
||||||
|
|||||||
Reference in New Issue
Block a user