build(deps): bump github.com/sigstore/cosign/v2 from 2.0.2 to 2.1.1 #5113
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
pull_request: | |
env: | |
GO_VERSION: '1.20' | |
NIX_VERSION: '2.15.1' | |
BOM_VERSION: v0.5.1 | |
permissions: {} | |
jobs: | |
macos: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- run: make test-unit | |
- run: make verify-go-lint | |
nix: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac | |
with: | |
install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install | |
- uses: cachix/cachix-action@6a9a34cdd93d0ae4b4b59fd678660efb08109f2f | |
with: | |
name: security-profiles-operator | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
pushFilter: security-profiles-operator | |
- run: make nix | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: build | |
path: build.tar.gz | |
nix-spoc: | |
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags') | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write # required for updating the release | |
id-token: write # required for sigstore signing | |
steps: | |
- uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1 | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac | |
with: | |
install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install | |
- uses: cachix/cachix-action@6a9a34cdd93d0ae4b4b59fd678660efb08109f2f | |
with: | |
name: security-profiles-operator | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
pushFilter: security-profiles-operator | |
- run: | | |
sudo curl -sSfL --retry 5 --retry-delay 3 -o /usr/bin/bom \ | |
https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux | |
sudo chmod +x /usr/bin/bom | |
- run: make nix-spoc | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: spoc | |
path: | | |
build/* | |
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
build/* | |
bpf: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac | |
with: | |
install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install | |
- uses: cachix/cachix-action@6a9a34cdd93d0ae4b4b59fd678660efb08109f2f | |
with: | |
name: security-profiles-operator | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
pushFilter: security-profiles-operator | |
- run: make verify-bpf | |
build-image: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@16c0bc4a6e6ada2cfd8afd41d22d95379cf7c32a | |
- name: Login to Quay | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc | |
with: | |
registry: quay.io/security-profiles-operator | |
username: security-profiles-operator+github | |
password: ${{ secrets.QUAY_TOKEN }} | |
if: github.ref == 'refs/heads/main' | |
- name: Image metadata | |
id: meta | |
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 | |
with: | |
images: | | |
quay.io/security-profiles-operator/build | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=ref,event=tag | |
type=sha,format=long | |
- name: Build (and push if needed) | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 | |
with: | |
context: . | |
file: Dockerfile.build-image | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: ${{ github.ref == 'refs/heads/main' }} | |
# Only load on PR builds | |
load: ${{ github.ref != 'refs/heads/main' }} | |
- name: Run container image vulnerability scanner | |
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 | |
with: | |
image-ref: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} | |
format: 'table' | |
# TODO(jaosorior): Fix this once we bump the NixOS dependencies. | |
exit-code: '0' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
timeout: 10m | |
operator-image: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@16c0bc4a6e6ada2cfd8afd41d22d95379cf7c32a | |
- name: Login to Quay | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc | |
with: | |
registry: quay.io/security-profiles-operator | |
username: security-profiles-operator+github | |
password: ${{ secrets.QUAY_TOKEN }} | |
if: github.ref == 'refs/heads/main' | |
- name: Image metadata | |
id: meta | |
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 | |
with: | |
images: | | |
quay.io/security-profiles-operator/spo | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=ref,event=tag | |
type=sha,format=long | |
- name: Build | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 | |
with: | |
context: . | |
file: Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
load: true | |
- name: Run container image vulnerability scanner | |
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 | |
with: | |
image-ref: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
ubi-image: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@16c0bc4a6e6ada2cfd8afd41d22d95379cf7c32a | |
- name: Login to Quay | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc | |
with: | |
registry: quay.io/security-profiles-operator | |
username: security-profiles-operator+github | |
password: ${{ secrets.QUAY_TOKEN }} | |
if: github.ref == 'refs/heads/main' | |
- name: Image metadata | |
id: meta | |
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 | |
with: | |
images: | | |
quay.io/security-profiles-operator/build | |
flavor: | | |
suffix=-ubi | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=ref,event=tag | |
type=sha,format=long | |
# TODO(jaosorior): Push UBI image too | |
- name: Build | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 | |
with: | |
context: . | |
file: Dockerfile.ubi | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
load: true | |
- name: Run container image vulnerability scanner | |
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 | |
with: | |
image-ref: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' |