Skip to content

Commit 5e26216

Browse files
authored
Merge pull request #175 from stackitcloud/fix-pipeline
feat(ci): optimize go caching and wire up release security features
2 parents b17a30f + 4ce3d4d commit 5e26216

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,14 @@ jobs:
2222
runs-on: ${{ matrix.os }}
2323

2424
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
2528
- name: Install Go
2629
uses: actions/setup-go@v6
2730
with:
2831
go-version: ${{ matrix.go-version }}
2932

30-
- name: Checkout code
31-
uses: actions/checkout@v6
32-
33-
# cache go modules
34-
- uses: actions/cache@v5
35-
with:
36-
# In order:
37-
# * Module download cache
38-
# * Build cache (Linux)
39-
# * Build cache (Mac)
40-
# * Build cache (Windows)
41-
path: |
42-
~/go/pkg/mod
43-
~/.cache/go-build
44-
~/Library/Caches/go-build
45-
%LocalAppData%\go-build
46-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
47-
restore-keys: |
48-
${{ runner.os }}-go-
49-
5033
- name: Downloads the dependencies
5134
run: make download
5235

.github/workflows/release.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,7 @@ jobs:
2828
uses: actions/setup-go@v6
2929
with:
3030
go-version: stable
31-
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
32-
with:
33-
path: |
34-
~/.cache/go-build
35-
~/go/pkg/mod
36-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37-
restore-keys: |
38-
${{ runner.os }}-go-
31+
3932
- uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
4033
- uses: anchore/sbom-action/download-syft@17ae1740179002c89186b61233e0f892c3118b11 # v0.23.0
4134

.goreleaser.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,27 @@ changelog:
9898
exclude:
9999
- '^docs:'
100100
- '^test:'
101+
102+
sboms:
103+
- artifacts: archive
104+
105+
# sign checksums/archives using Cosign
106+
signs:
107+
- artifacts: checksum
108+
cmd: cosign
109+
args:
110+
- "sign-blob"
111+
- "--key=env://COSIGN_PRIVATE_KEY"
112+
- "--output-signature=${signature}"
113+
- "--yes"
114+
- "${artifact}"
115+
116+
# sign published Docker images using Cosign
117+
docker_signs:
118+
- artifacts: manifests
119+
cmd: cosign
120+
args:
121+
- "sign"
122+
- "--key=env://COSIGN_PRIVATE_KEY"
123+
- "--yes"
124+
- "${artifact}"

0 commit comments

Comments
 (0)