diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 216e8f9..0d89c94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,31 +23,14 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go uses: actions/setup-go@v6 with: go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v6 - - # cache go modules - - uses: actions/cache@v5 - with: - # In order: - # * Module download cache - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - %LocalAppData%\go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Downloads the dependencies run: make download diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8ac27bc..b3848b8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,14 +28,7 @@ jobs: uses: actions/setup-go@v6 with: go-version: stable - - uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0 - uses: anchore/sbom-action/download-syft@28d71544de8eaf1b958d335707167c5f783590ad # v0.22.2 diff --git a/.goreleaser.yml b/.goreleaser.yml index 581fc91..f8660ed 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -98,3 +98,27 @@ changelog: exclude: - '^docs:' - '^test:' + +sboms: + - artifacts: archive + +# sign checksums/archives using Cosign +signs: + - artifacts: checksum + cmd: cosign + args: + - "sign-blob" + - "--key=env://COSIGN_PRIVATE_KEY" + - "--output-signature=${signature}" + - "--yes" + - "${artifact}" + +# sign published Docker images using Cosign +docker_signs: + - artifacts: manifests + cmd: cosign + args: + - "sign" + - "--key=env://COSIGN_PRIVATE_KEY" + - "--yes" + - "${artifact}" \ No newline at end of file