File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Auto Start CI
2+
3+ on :
4+ schedule :
5+ # Runs every five minutes (fastest the scheduler can run). Five minutes is
6+ # optimistic, it can take longer to run.
7+ # To understand why `schedule` is used instead of other events, refer to
8+ # ./doc/guides/commit-queue.md
9+ - cron : ' */5 * * * *'
10+
11+ env :
12+ NODE_VERSION : lts/*
13+
14+ jobs :
15+ startCI :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v2
19+
20+ - name : Set variables
21+ run : |
22+ echo "REPOSITORY=$(echo ${{ github.repository }} | cut -d/ -f2)" >> $GITHUB_ENV
23+ echo "OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
24+
25+ # Get Pull Requests
26+ - name : Get Pull Requests
27+ uses : octokit/graphql-action@v2
28+ id : get_prs_for_ci
29+ with :
30+ query : |
31+ query prs($owner:String!, $repo:String!) {
32+ repository(owner:$owner, name:$repo) {
33+ pullRequests(labels: ["request-ci"], states: OPEN, last: 100) {
34+ nodes { number }
35+ }
36+ }
37+ }
38+ owner : ${{ env.OWNER }}
39+ repo : ${{ env.REPOSITORY }}
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+
43+ - run : echo '${{ toJSON(steps.get_prs_for_ci.outputs.data) }}'
44+
You can’t perform that action at this time.
0 commit comments