-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.16 KB
/
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
40
41
42
name: Build
on:
push:
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io
IMAGE_REPOSITORY: minbzk/logboek-dataverwerkingen-demo
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
app:
- munera
- currus
- lamina
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build args
id: build_args
run: echo "commit_short_sha=$(git rev-parse --short HEAD)" >> ${GITHUB_OUTPUT}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./apps/${{ matrix.app }}
build-args: BUILD_COMMIT=${{ steps.build_args.outputs.commit_short_sha }}
push: ${{ github.ref_name == github.event.repository.default_branch }}
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPOSITORY }}/${{ matrix.app }}:latest