55
55
echo "MAIN IMAGE AT: ${{ vars.QUAY_RELEASE_REPO }}:latest"
56
56
echo "CI IMAGE AT: quay.io/trustyai/guardrails-detector-huggingface-runtime-ci:${{ github.event.pull_request.head.sha }}"
57
57
echo "Built-In Detector CI IMAGE AT: quay.io/trustyai/guardrails-detector-built-in-ci:${{ github.event.pull_request.head.sha }}"
58
+ echo "LLM Judge CI IMAGE AT: quay.io/trustyai/guardrails-detector-llm-judge-ci:${{ github.event.pull_request.head.sha }}"
58
59
59
60
# Set environments depending on context
60
61
- name : Set CI environment
@@ -63,25 +64,29 @@ jobs:
63
64
echo "TAG=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
64
65
echo "IMAGE_NAME=quay.io/trustyai/guardrails-detector-huggingface-runtime-ci" >> $GITHUB_ENV
65
66
echo "BUILTIN_IMAGE_NAME=quay.io/trustyai/guardrails-detector-built-in-ci" >> $GITHUB_ENV
67
+ echo "LLM_JUDGE_IMAGE_NAME=quay.io/trustyai/guardrails-detector-llm-judge-ci" >> $GITHUB_ENV
66
68
- name : Set main-branch environment
67
69
if : env.BUILD_CONTEXT == 'main'
68
70
run : |
69
71
echo "TAG=latest" >> $GITHUB_ENV
70
72
echo "IMAGE_NAME=${{ vars.QUAY_RELEASE_REPO }}" >> $GITHUB_ENV
71
73
echo "BUILTIN_IMAGE_NAME=quay.io/trustyai/guardrails-detector-built-in" >> $GITHUB_ENV
74
+ echo "LLM_JUDGE_IMAGE_NAME=quay.io/trustyai/guardrails-detector-llm-judge" >> $GITHUB_ENV
72
75
- name : Set tag environment
73
76
if : env.BUILD_CONTEXT == 'tag'
74
77
run : |
75
78
echo "TAG=${{ github.ref_name }}" >> $GITHUB_ENV
76
79
echo "IMAGE_NAME=${{ vars.QUAY_RELEASE_REPO }}" >> $GITHUB_ENV
77
80
echo "BUILTIN_IMAGE_NAME=quay.io/trustyai/guardrails-detector-built-in" >> $GITHUB_ENV
81
+ echo "LLM_JUDGE_IMAGE_NAME=quay.io/trustyai/guardrails-detector-llm-judge" >> $GITHUB_ENV
78
82
#
79
83
# Run docker commands
80
84
- name : Put expiry date on CI-tagged image
81
85
if : env.BUILD_CONTEXT == 'ci'
82
86
run : |
83
87
echo 'LABEL quay.expires-after=7d#' >> detectors/Dockerfile.hf
84
88
echo 'LABEL quay.expires-after=7d#' >> detectors/Dockerfile.builtIn
89
+ echo 'LABEL quay.expires-after=7d#' >> detectors/Dockerfile.judge
85
90
- name : Build image
86
91
run : docker build -t ${{ env.IMAGE_NAME }}:$TAG -f detectors/Dockerfile.hf detectors
87
92
- name : Log in to Quay
92
97
run : docker build -t ${{ env.BUILTIN_IMAGE_NAME }}:$TAG -f detectors/Dockerfile.builtIn detectors
93
98
- name : Push to Quay CI repo
94
99
run : docker push ${{ env.BUILTIN_IMAGE_NAME }}:$TAG
95
-
100
+ - name : Build LLM Judge detector image
101
+ run : docker build -t ${{ env.LLM_JUDGE_IMAGE_NAME }}:$TAG -f detectors/Dockerfile.judge detectors
102
+ - name : Push LLM Judge image to Quay CI repo
103
+ run : docker push ${{ env.LLM_JUDGE_IMAGE_NAME }}:$TAG
96
104
# Leave comment
97
105
- uses : peter-evans/find-comment@v3
98
106
name : Find Comment
@@ -114,6 +122,7 @@ jobs:
114
122
115
123
📦 [PR image](https://quay.io/repository/trustyai/guardrails-detector-huggingface-runtime-ci?tab=tags): `quay.io/trustyai/guardrails-detector-huggingface-runtime-ci:${{ github.event.pull_request.head.sha }}`
116
124
📦 [PR image](https://quay.io/trustyai/guardrails-detector-built-in-ci?tab=tags): `quay.io/trustyai/guardrails-detector-built-in-ci:${{ github.event.pull_request.head.sha }}`
125
+ 📦 [PR image](https://quay.io/trustyai/guardrails-detector-llm-judge-ci?tab=tags): `quay.io/trustyai/guardrails-detector-llm-judge-ci:${{ github.event.pull_request.head.sha }}`
117
126
- name : Trivy scan
118
127
uses :
aquasecurity/[email protected]
119
128
with :
@@ -136,6 +145,17 @@ jobs:
136
145
exit-code : ' 0'
137
146
ignore-unfixed : false
138
147
vuln-type : ' os,library'
148
+ - name : Trivy scan, LLM Judge image
149
+ uses :
aquasecurity/[email protected]
150
+ with :
151
+ scan-type : ' image'
152
+ image-ref : " ${{ env.LLM_JUDGE_IMAGE_NAME }}:${{ env.TAG }}"
153
+ format : ' sarif'
154
+ output : ' trivy-results-llm-judge.sarif'
155
+ severity : ' MEDIUM,HIGH,CRITICAL'
156
+ exit-code : ' 0'
157
+ ignore-unfixed : false
158
+ vuln-type : ' os,library'
139
159
- name : Update Security tab - Huggingface
140
160
uses : github/codeql-action/upload-sarif@v3
141
161
with :
@@ -146,3 +166,8 @@ jobs:
146
166
with :
147
167
sarif_file : ' trivy-results-built-in.sarif'
148
168
category : built-in
169
+ - name : Update Security tab - LLM Judge
170
+ uses : github/codeql-action/upload-sarif@v3
171
+ with :
172
+ sarif_file : ' trivy-results-llm-judge.sarif'
173
+ category : llm-judge
0 commit comments