-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.12 KB
/
pr_build.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
name: PR CI Image Build
on: pull_request
jobs:
build-image:
name: Build Docker and push image
runs-on: ubuntu-latest
env:
GHCR_PAT: ${{secrets.GHCR_PAT}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/digiblink/alpine-nginx-php74-pdf
tags: |
type=sha,prefix=pr-
flavor: |
latest=false
prefix=
suffix=
labels: |
org.opencontainers.image.vendor=digiBlink
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}