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 Docker Image on PR
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master # or your default branch
7+
8+ env :
9+ GH_TOKEN : ${{secrets.GH_TOKEN}}
10+
11+ jobs :
12+ push :
13+ name : " Build Docker Image"
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout Code
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Qemu
21+ uses : docker/setup-qemu-action@v3
22+
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v3
25+ with :
26+ buildkitd-flags : --debug
27+
28+ - uses : docker/login-action@v3
29+ with :
30+ registry : ghcr.io
31+ username : ${{ github.repository_owner }}
32+ password : ${{ secrets.GH_TOKEN }}
33+
34+ - uses : docker/build-push-action@v5
35+ with :
36+ context : ./
37+ file : ./LinkRouter/Dockerfile
38+ platforms : linux/amd64,linux/arm64
39+ push : true
40+ tags : |
41+ ghcr.io/${{ github.repository_owner }}/linkrouter:pr-${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments