File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1414 packages : write
1515 contents : write
1616 runs-on : ubuntu-latest
17+ env :
18+ REGISTRY : ghcr.io
19+ IMAGE_NAME : ${{ github.repository }}
1720 steps :
1821 - name : Checkout
1922 uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2225 - name : Set up Go
2326 uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
2427 with :
25- go-version : 1.19
28+ go-version : 1.20
2629 - uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
2730 with :
2831 path : |
@@ -33,10 +36,26 @@ jobs:
3336 ${{ runner.os }}-go-
3437 - uses : sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
3538 - 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+ 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+
3653 - name : Run GoReleaser
3754 uses : goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
3855 with :
3956 version : latest
4057 args : release --clean
4158 env :
4259 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:
4444 - src : README*
4545 - src : changelog*
4646 - 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
4766snapshot :
4867 name_template : ' {{ .Version }}-SNAPSHOT-{{ .ShortCommit }}'
4968checksum :
You can’t perform that action at this time.
0 commit comments