Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 51e42b5

Browse files
author
Luke Hinds
authored
Merge pull request #317 from stacklok/image-changes
Push to stacklok/codegate and sign / scan
2 parents 324c78f + f8e9049 commit 51e42b5

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
4343

4444
- name: Install dependencies
45-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
4645
run: poetry install --with dev
4746

4847
- name: Run linting

.github/workflows/image-publish.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ jobs:
1313
contents: read
1414
packages: write
1515
actions: read
16+
id-token: write
17+
attestations: write
1618
env:
17-
BASE_REPO: "ghcr.io/stacklok"
18-
CODEGATE_SERVER_IMAGE: "ghcr.io/stacklok/codegate/codegate"
19+
REGISTRY: ghcr.io
20+
IMAGE_NAME: ${{ github.repository }}
1921
steps:
2022
- name: Checkout
2123
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
@@ -39,11 +41,11 @@ jobs:
3941
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
4042
id: docker-metadata
4143
with:
42-
images: ${{ env.CODEGATE_SERVER_IMAGE }}
44+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4345
labels: |
4446
org.opencontainers.image.source=${{ github.repositoryUrl }}
45-
org.opencontainers.image.description="This is a container for the Stacklok Codegate server"
46-
org.opencontainers.image.title="Stacklok Codegate Server"
47+
org.opencontainers.image.description="Container image for the Codegate Local Gateway"
48+
org.opencontainers.image.title="Codegate Container Image"
4749
org.opencontainers.image.vendor="Stacklok Inc."
4850
org.opencontainers.image.version=${{ github.sha }}
4951
flavor: |
@@ -65,7 +67,7 @@ jobs:
6567
id: fetch_commit_fe_sha
6668
run: |
6769
echo "LATEST_COMMIT_SHA=$(curl -LSsk 'https://api.github.com/repos/stacklok/codegate-ui/commits?per_page=1' -H 'Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}' | jq -r '.[0].sha')" >> $GITHUB_ENV
68-
- name: Rename to accomodate to image
70+
- name: Rename to accommodate to image
6971
run: mv ./backup_weaviate ./weaviate_backup
7072
- name: Download git lfs dependencies
7173
run: |
@@ -88,3 +90,15 @@ jobs:
8890
gh_token=${{ secrets.GH_CI_TOKEN }}
8991
build-args: |
9092
LATEST_COMMIT_SHA=${{ env.LATEST_COMMIT_SHA }}
93+
- name: Install cosign
94+
if: github.event_name != 'pull_request'
95+
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
96+
- name: Run Trivy vulnerability scanner
97+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
98+
with:
99+
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-string.outputs.tag }}'
100+
format: 'table'
101+
exit-code: '1'
102+
ignore-unfixed: true
103+
vuln-type: 'os,library'
104+
severity: 'CRITICAL,HIGH'

0 commit comments

Comments
 (0)