File tree 2 files changed +39
-1
lines changed
2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 14
14
packages : write
15
15
contents : write
16
16
runs-on : ubuntu-latest
17
+ env :
18
+ REGISTRY : ghcr.io
19
+ IMAGE_NAME : ${{ github.repository }}
17
20
steps :
18
21
- name : Checkout
19
22
uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
22
25
- name : Set up Go
23
26
uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
24
27
with :
25
- go-version : 1.19
28
+ go-version : 1.20
26
29
- uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
27
30
with :
28
31
path : |
@@ -33,10 +36,26 @@ jobs:
33
36
${{ runner.os }}-go-
34
37
- uses : sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
35
38
- uses : anchore/sbom-action/download-syft@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
39
+
40
+ - name : Set Up Docker Buildx
41
+ uses : docker/setup-buildx-action@v2
42
+
43
+ - name : Set up Cosign
44
+ uses : sigstore/cosign-installer@v3.1.1
45
+
46
+ - name : Login to Registry
47
+ uses : docker/login-action@v2
48
+ with :
49
+ registry : ${{ env.REGISTRY }}
50
+ username : ${{ github.actor }}
51
+ password : ${{ secrets.GITHUB_TOKEN }}
52
+
36
53
- name : Run GoReleaser
37
54
uses : goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
38
55
with :
39
56
version : latest
40
57
args : release --clean
41
58
env :
42
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
+ COSIGN_PRIVATE_KEY : ${{secrets.COSIGN_PRIVATE_KEY}}
61
+ COSIGN_PASSWORD : ${{secrets.COSIGN_KEY_PASSWORD}}
Original file line number Diff line number Diff line change @@ -44,6 +44,25 @@ archives:
44
44
- src : README*
45
45
- src : changelog*
46
46
- src : CHANGELOG*
47
+ dockers :
48
+ - id : external-dns-stackit-webhook
49
+ use : buildx
50
+ image_templates :
51
+ - " {{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
52
+ - " {{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
53
+ - " {{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .ShortCommit }}"
54
+ goos : linux
55
+ goarch : amd64
56
+ build_flag_templates :
57
+ - --label=org.opencontainers.image.title={{ .ProjectName }}
58
+ - --label=org.opencontainers.image.description=stackit DNS webhook for external-dns
59
+ - --label=org.opencontainers.image.url=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
60
+ - --label=org.opencontainers.image.source=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
61
+ - --label=org.opencontainers.image.version={{ .Version }}
62
+ - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
63
+ - --label=org.opencontainers.image.revision={{ .FullCommit }}
64
+ - --label=org.opencontainers.image.licenses=Apache-2.0
65
+ skip_push : false
47
66
snapshot :
48
67
name_template : ' {{ .Version }}-SNAPSHOT-{{ .ShortCommit }}'
49
68
checksum :
You can’t perform that action at this time.
0 commit comments