Skip to content

Commit

Permalink
Exp
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed May 7, 2024
1 parent cc5e568 commit 72753b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/pr-gh-workflow-approve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
console.log(context)
const result = await github.rest.actions.listWorkflowRunsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -31,10 +33,15 @@ jobs:
per_page: 100
});
for (var run of result.data.workflow_runs) {
await github.rest.actions.createWorkflowDispatch({
context.repo.owner,
context.repo.repo,
"lint",
context.ref,
});
await github.rest.actions.approveWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: run.id
});
}
1 change: 1 addition & 0 deletions .github/workflows/pr-golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: PR golangci-lint
on:
pull_request:
types: [opened, edited, synchronize, reopened]
workflow_dispatch:

# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}
Expand Down

0 comments on commit 72753b6

Please sign in to comment.