-
Notifications
You must be signed in to change notification settings - Fork 284
42 lines (36 loc) · 1.07 KB
/
build-pr.yaml
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
name: Build PR
on:
pull_request_review:
types: [submitted]
jobs:
build:
name: Build PR container
if: github.repository == 'xibosignage/xibo-cms' && github.event.review.state == 'APPROVED'
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Configure Build X
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Container
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ci
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/xibosignage/xibo-cms:test-${{ github.event.pull_request.number }}
build-args: GIT_COMMIT=${{ github.event.head.sha }}
push: true
load: false