-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 1.64 KB
/
build-base-image.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
51
52
53
54
name: Build baseimage
on:
push:
paths:
- "Dockerfile.base"
- ".github/workflows/build-base-image.yml"
- "root/**"
branches:
- main
jobs:
bake:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: docker/[email protected]
with:
images: |
ghcr.io/${{ github.repository_owner }}/prarr
labels: |
org.opencontainers.image.title=prarr
org.opencontainers.image.description=prarr base
org.opencontainers.image.vendor=${{ github.repository_owner }}
flavor: |
prefix=baseimage-,onlatest=true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate build date
id: gen_date
run: |
BUILD_DATE=$(date '+%Y-%m-%dT%H:%M:%S%:z')
echo "**** Setting build date to $BUILD_DATE ****"
echo "build_date=${BUILD_DATE}" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/[email protected]
with:
files: |
./docker-bake.hcl
${{ steps.docker_meta.outputs.bake-file }}
set: |
image.args.BUILD_DATE=${{ steps.gen_date.outputs.build_date }}
targets: base
push: true