Skip to content

Commit

Permalink
ci(label): show info of check runs with mutiple commits for a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Aug 15, 2023
1 parent 4f9ef5a commit 0dcff07
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,28 @@ concurrency:
cancel-in-progress: true

jobs:
check:
build:
# uses: ./.github/workflows/build.yml
# # TODO: dispatch this workflow with github action API
# # for more conditions. for example, if the there is
# # already a build check exist. (issue-2888)
# if: github.event.label.name == 'A0-pleasereview'
# with:
# macos: ${{ github.event.label.name == 'E2-forcemacos' }}
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/github-script@v6
with:
access_token: ${{ github.token }}
github-token: "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"
script: |
const {
data: {
check_runs
}
} = await github.rest.checks.listForRef({
owner: "gear-tech",
repo: "gear",
ref: "cl/issue-2888"
});
build:
uses: ./.github/workflows/build.yml
# TODO: dispatch this workflow with github action API
# for more conditions. for example, if the there is
# already a build check exist. (issue-2888)
if: github.event.label.name == 'A0-pleasereview'
with:
macos: ${{ github.event.label.name == 'E2-forcemacos' }}
console.log(check_runs);

0 comments on commit 0dcff07

Please sign in to comment.