Skip to content

ci(label): trigger workflows on labelling #1

ci(label): trigger workflows on labelling

ci(label): trigger workflows on labelling #1

Workflow file for this run

name: Label
on:
pull_request:
branches: [master, vara-stage-1, vara-stage-2, vara-stage-3]
types: [labeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
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:
- uses: actions/github-script@v6
with:
script: |
const [owner, repo] = ["gear-tech", "gear"];
const { ref, payload: { issue } } = context;
// const ref = "cl/issue-2888";
// const issue_number = 3070;
// List all labels of the current pull request.
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner,
repo,
issue_number,
});
console.log(labels);
// List the latest check runs
const {
data: {
check_runs
}
} = await github.rest.checks.listForRef({
owner,
repo,
ref,
});
// console.log(check_runs);