File tree Expand file tree Collapse file tree 1 file changed +2
-26
lines changed
Expand file tree Collapse file tree 1 file changed +2
-26
lines changed Original file line number Diff line number Diff line change @@ -3,34 +3,10 @@ run-name: Docker build CI triggered from @${{ github.actor }} of ${{ github.head
33on :
44 workflow_dispatch :
55 pull_request :
6- types : [labeled ]
6+ types : [opened, synchronize, reopened ]
77jobs :
8- # Only runs Docker build jobs if a PR has received a final "design approved" label as a final check
9- check-label :
10- name : Check for required label
11- runs-on : ubuntu-latest
12- if : github.event_name == 'pull_request'
13- outputs :
14- should-run : ${{ steps.check-label.outputs.has-label }}
15- steps :
16- - id : check-label
17- uses : actions/github-script@v6
18- with :
19- script : |
20- const { data: labels } = await github.rest.issues.listLabelsOnIssue({
21- owner: context.repo.owner,
22- repo: context.repo.repo,
23- issue_number: context.issue.number
24- });
25- const hasLabel = labels.some(label => label.name === 'design-approved');
26- core.setOutput('has-label', hasLabel);
27- console.log(`PR has 'design-approved' label: ${hasLabel}`);
28-
298 docker :
309 name : Docker build
31- needs : check-label
32- # Run if it's not a PR or if it's a PR with the required label
33- if : github.event_name != 'pull_request' || needs.check-label.outputs.should-run == 'true'
3410 runs-on : arbitrator-ci
3511 services :
3612 # local registry
10884 keys=(${{ runner.os }}-buildx- ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }})
10985 for key in "${keys[@]}"; do
11086 curl -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/caches/$key"
111- done
87+ done
You can’t perform that action at this time.
0 commit comments