-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (42 loc) · 1.22 KB
/
build-pr.yml
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
45
46
47
48
49
50
name: Build PR
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true
env:
IMAGE_OWNER: "deploykf"
IMAGE_TITLE: "dashboard"
IMAGE_FOLDER: "dashboard"
IMAGE_PLATFORMS: |-
linux/amd64
linux/arm64
jobs:
build_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install QEMU
uses: docker/setup-qemu-action@v2
- name: Install Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Image Tags/Labels
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ env.IMAGE_OWNER }}/ci/${{ env.IMAGE_TITLE }}
tags: |
type=ref,event=pr,prefix=pr-,suffix=
- name: Build Image
uses: docker/build-push-action@v4
with:
context: ./${{ env.IMAGE_FOLDER }}
push: false
platforms: ${{ env.IMAGE_PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/${{ env.IMAGE_OWNER }}/ci/${{ env.IMAGE_TITLE }}