File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,22 @@ name: Docker
7
7
8
8
on :
9
9
schedule :
10
- - cron : ' 27 0 * * *'
10
+ - cron : " 27 0 * * *"
11
11
push :
12
- branches : [ "main" ]
12
+ branches : ["main"]
13
13
# Publish semver tags as releases.
14
- tags : [ ' v*.*.*' ]
14
+ tags : [" v*.*.*" ]
15
15
pull_request :
16
- branches : [ "main" ]
16
+ branches : ["main"]
17
17
18
18
env :
19
19
# Use docker.io for Docker Hub if empty
20
20
REGISTRY : ghcr.io
21
21
# github.repository as <account>/<repo>
22
22
IMAGE_NAME : ${{ github.repository }}
23
23
24
-
25
24
jobs :
26
25
build :
27
-
28
26
runs-on : ubuntu-latest
29
27
permissions :
30
28
contents : read
43
41
if : github.event_name != 'pull_request'
44
42
uses : sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
45
43
with :
46
- cosign-release : ' v2.2.4'
44
+ cosign-release : " v2.2.4"
47
45
48
46
# Set up BuildKit Docker container builder to be able to build
49
47
# multi-platform images and export cache
82
80
cache-from : type=gha
83
81
cache-to : type=gha,mode=max
84
82
platforms : linux/amd64,linux/arm64
83
+ build-args :
84
+ VERSION : ${{ github.ref_name }}
85
85
86
86
# Sign the resulting Docker image digest except on PRs.
87
87
# This will only write to the public Rekor transparency log when the Docker
Original file line number Diff line number Diff line change 1
1
ARG VERSION="dev"
2
2
3
3
FROM golang:1.23.7 AS build
4
+ # allow this step access to build arg
5
+ ARG VERSION
4
6
# Set the working directory
5
7
WORKDIR /build
6
8
# Copy the current directory contents into the working directory
You can’t perform that action at this time.
0 commit comments