13
13
contents : read
14
14
packages : write
15
15
actions : read
16
+ id-token : write
17
+ attestations : write
16
18
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 }}
19
21
steps :
20
22
- name : Checkout
21
23
uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
@@ -39,11 +41,11 @@ jobs:
39
41
uses : docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
40
42
id : docker-metadata
41
43
with :
42
- images : ${{ env.CODEGATE_SERVER_IMAGE }}
44
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43
45
labels : |
44
46
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 "
47
49
org.opencontainers.image.vendor="Stacklok Inc."
48
50
org.opencontainers.image.version=${{ github.sha }}
49
51
flavor : |
65
67
id : fetch_commit_fe_sha
66
68
run : |
67
69
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
69
71
run : mv ./backup_weaviate ./weaviate_backup
70
72
- name : Download git lfs dependencies
71
73
run : |
88
90
gh_token=${{ secrets.GH_CI_TOKEN }}
89
91
build-args : |
90
92
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