Skip to content

Commit 1c325e9

Browse files
authored
ci: Add cosign and syft to the cockpit workflow (#326)
* ci: Update Makefile to include operator-templating changes * add cosign and syft to workflow * add permission to publish job * add oci credential envs
1 parent 705925a commit 1c325e9

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/pr_cockpit.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,11 @@ jobs:
3030
name: General Pull Request Checks
3131
uses: ./.github/workflows/pr_general.yml
3232

33-
reviewdog-checks:
34-
name: Reviewdog Pull Request Checks
35-
uses: ./.github/workflows/pr_reviewdog.yml
36-
3733
check-charts:
3834
name: Helm Chart Check
3935
runs-on: ubuntu-latest
4036
needs:
4137
- general-checks
42-
- reviewdog-checks
4338
steps:
4439
- name: Checkout Repository
4540
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
@@ -76,9 +71,15 @@ jobs:
7671
7772
publish:
7873
name: Publish Docker Image
74+
permissions:
75+
id-token: write
7976
runs-on: ubuntu-latest
8077
env:
8178
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
79+
OCI_REGISTRY_SDP_PASSWORD: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
80+
OCI_REGISTRY_SDP_USERNAME: "robot$sdp+github-action-build"
81+
OCI_REGISTRY_SDP_CHARTS_PASSWORD: ${{ secrets.HARBOR_ROBOT_SDP_CHARTS_GITHUB_ACTION_BUILD_SECRET }}
82+
OCI_REGISTRY_SDP_CHARTS_USERNAME: "robot$sdp-charts+github-action-build"
8283
outputs:
8384
IMAGE_TAG: ${{ steps.printtag.outputs.IMAGE_TAG }}
8485
needs:
@@ -99,6 +100,12 @@ jobs:
99100
with:
100101
go-version: ${{ env.GO_VERSION }}
101102

103+
- name: Install cosign
104+
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
105+
106+
- name: Install syft
107+
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2
108+
102109
- name: Setup Rust Cache
103110
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
104111
with:

0 commit comments

Comments
 (0)