@@ -3,16 +3,15 @@ name: "Build and Publish"
3
3
on :
4
4
workflow_dispatch :
5
5
push :
6
+ # The ${{ github.ref_name }} is used as the BeeGFS version so this workflow should only be
7
+ # triggered by pushing tags that match the BeeGFS semantic versioning scheme.
6
8
tags :
7
9
- " [0-9].[0-9].[0-9]"
8
- pull_request :
9
- branches :
10
- - " main"
11
10
12
11
env :
13
12
REGISTRY : ghcr.io
14
13
NAMESPACE : thinkparq
15
- DOCKER_BUILDX_BUILD_PLATFORMS : " linux/amd64,linux/arm64"
14
+ DOCKER_BUILDX_BUILD_PLATFORMS : " linux/amd64,linux/arm64"
16
15
17
16
jobs :
18
17
publish-images :
@@ -29,13 +28,13 @@ jobs:
29
28
packages : write
30
29
contents : read
31
30
steps :
32
- - uses : actions/checkout@v3
31
+ - uses : actions/checkout@v4
33
32
with :
34
33
fetch-tags : true
35
34
fetch-depth : 0
36
35
37
36
- name : Set up Docker Buildx
38
- uses : docker/setup-buildx-action@v3
37
+ uses : docker/setup-buildx-action@v3
39
38
40
39
- name : Log in to the GitHub Container Registry
41
40
uses : docker/login-action@v3
47
46
- name : Install Cosign
48
47
49
48
with :
50
- cosign-release : " v2.1.1"
51
-
52
- - name : Determine what version of BeeGFS to build images for based on the last tag
53
- id : determine_beegfs_version
54
- run : |
55
- last_version=$(git describe --tags --abbrev=0)
56
- echo "LAST_VERSION=$last_version" >> $GITHUB_OUTPUT
49
+ cosign-release : " v2.1.1"
57
50
58
51
- name : Determine metadata for BeeGFS image
59
52
id : meta
83
76
# Reference: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#adding-a-description-to-multi-arch-images
84
77
outputs : type=image,name=target,annotation-index.org.opencontainers.image.description=Container images for the BeeGFS server services allowing fully containerized BeeGFS deployments
85
78
build-args : |
86
- BEEGFS_VERSION=${{ steps.determine_beegfs_version.outputs.LAST_VERSION }}
79
+ BEEGFS_VERSION=${{ github.ref_name }}
87
80
target : ${{ matrix.image_name }}
88
81
89
82
# Adapted from:
0 commit comments