1- name : Trigger Docker image build
2-
3- on :
4- pull_request_target :
5- types :
6- - closed
7- branches :
8- - current
9- - circinus
10- - sagitta
11-
12- permissions :
13- packages : write
14- contents : read
15- attestations : write
16- id-token : write
17- pull-requests : read
18-
19- jobs :
20- track-changes :
21- if : github.event.pull_request.merged == true
22- runs-on : ubuntu-latest
23-
24- env :
25- REF : main # Used for curl to trigger image build
26-
27- steps :
28- - name : Checkout vyos/vyos-build repo
29- uses : actions/checkout@v6
30- with :
31- ref : ${{ github.event.pull_request.base.ref }}
32-
33- - uses : dorny/paths-filter@v3
34- id : changes
35- with :
36- filters : |
37- docker-dir:
38- - 'docker/**'
39-
40- - name : " Trigger Docker image build for ${{ github.event.pull_request.base.ref }}"
41- if : ${{ steps.changes.outputs.docker-dir == 'true' }}
42- run : |
43- curl -L \
44- -X POST \
45- -H "Accept: application/vnd.github+json" \
46- -H "Authorization: Bearer ${{ secrets.PAT }}" \
47- -H "X-GitHub-Api-Version: 2022-11-28" \
48- https://api.github.com/repos/${{ secrets.REMOTE_OWNER }}/${{ secrets.REMOTE_REUSE_REPO }}/actions/workflows/build-docker-image.yml/dispatches \
1+ name : Trigger Docker image build
2+
3+ on :
4+ pull_request_target :
5+ types :
6+ - closed
7+ branches :
8+ - rolling
9+ - circinus
10+ - sagitta
11+
12+ permissions :
13+ packages : write
14+ contents : read
15+ attestations : write
16+ id-token : write
17+ pull-requests : read
18+
19+ jobs :
20+ track-changes :
21+ if : github.event.pull_request.merged == true
22+ runs-on : ubuntu-latest
23+
24+ env :
25+ REF : main # Used for curl to trigger image build
26+
27+ steps :
28+ - name : Checkout vyos/vyos-build repo
29+ uses : actions/checkout@v6
30+ with :
31+ ref : ${{ github.event.pull_request.base.ref }}
32+
33+ - uses : dorny/paths-filter@v3
34+ id : changes
35+ with :
36+ filters : |
37+ docker-dir:
38+ - 'docker/**'
39+
40+ - name : " Trigger Docker image build for ${{ github.event.pull_request.base.ref }}"
41+ if : ${{ steps.changes.outputs.docker-dir == 'true' }}
42+ run : |
43+ curl -L \
44+ -X POST \
45+ -H "Accept: application/vnd.github+json" \
46+ -H "Authorization: Bearer ${{ secrets.PAT }}" \
47+ -H "X-GitHub-Api-Version: 2022-11-28" \
48+ https://api.github.com/repos/${{ secrets.REMOTE_OWNER }}/${{ secrets.REMOTE_REUSE_REPO }}/actions/workflows/build-docker-image.yml/dispatches \
4949 -d '{"ref": "${{ env.REF }}", "inputs":{"branch":"${{ github.event.pull_request.base.ref }}", "environment":"production"}}'
0 commit comments