-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (59 loc) · 1.68 KB
/
Copy pathworkflow.yaml
File metadata and controls
72 lines (59 loc) · 1.68 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency: # Run release builds sequentially, cancel outdated PR builds
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions: # Grant write access to github.token within non-pull_request builds
contents: write
packages: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- id: release
name: Prepare release
uses: mgoltzsche/conventional-release@v0
with:
commit-files: compose.yaml VERSION
github-release-files: compose.yaml
ignore-commits-before: a0a3c294b3be797b831100c0b405a923e15239de
- name: Set up qemu
if: steps.release.outputs.publish
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Run unit tests
run: |
make test
- name: Run linter
run: |
make lint
- name: Build
if: '!steps.release.outputs.publish'
run: |
make container
- name: Log into GitHub Container Registry
if: steps.release.outputs.publish
run: echo "${{ github.token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Publish container image
if: steps.release.outputs.publish
run: |
set -u
make push-container VERSION=$RELEASE_VERSION
- name: Update version within VERSION file and compose.yaml
if: steps.release.outputs.publish
run: |
set -u
make update-version VERSION=$RELEASE_VERSION