-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.03 KB
/
pr-docker.yaml
File metadata and controls
44 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build Docker Image on PR
on:
workflow_dispatch:
pull_request_target:
types: [opened, synchronize]
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
jobs:
push:
name: "Build Docker Image"
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup Qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: ./
file: ./LinkRouter/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/linkrouter:pr-${{ github.event.pull_request.number }}