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 : Build PR Docker Image
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ pr_number :
7+ description : ' Pull request number to build'
8+ required : true
9+ type : number
10+
11+ env :
12+ REGISTRY : ghcr.io
13+ IMAGE_NAME : ${{ github.repository }}
14+
15+ jobs :
16+ build-and-push :
17+ runs-on : ubuntu-latest
18+ permissions :
19+ contents : read
20+ packages : write
21+ pull-requests : read
22+
23+ steps :
24+ - name : Checkout PR
25+ uses : actions/checkout@v4
26+ with :
27+ ref : refs/pull/${{ inputs.pr_number }}/merge
28+
29+ - name : Set up Docker Buildx
30+ uses : docker/setup-buildx-action@v3
31+
32+ - name : Log in to GitHub Container Registry
33+ uses : docker/login-action@v3
34+ with :
35+ registry : ${{ env.REGISTRY }}
36+ username : ${{ github.actor }}
37+ password : ${{ secrets.GITHUB_TOKEN }}
38+
39+ - name : Build and push Docker image
40+ uses : docker/build-push-action@v5
41+ with :
42+ context : .
43+ push : true
44+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ inputs.pr_number }}
45+ labels : |
46+ org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}/pull/${{ inputs.pr_number }}
47+ cache-from : type=gha
48+ cache-to : type=gha,mode=max
49+
50+ - name : Build and push Linesync Docker image
51+ uses : docker/build-push-action@v5
52+ with :
53+ context : ./tools/linesync
54+ push : true
55+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-linesync:pr-${{ inputs.pr_number }}
56+ labels : |
57+ org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}/pull/${{ inputs.pr_number }}
58+ cache-from : type=gha
59+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ tools/sidconvert/num2sid
2020# iauthd-ts build artifacts
2121tools /iauthd-ts /dist /
2222tools /iauthd-ts /node_modules /
23+ build /
You can’t perform that action at this time.
0 commit comments