Skip to content

Commit 9d5e358

Browse files
author
Tyler Titsworth
authored
Remove scan-container (#133)
1 parent 59a1421 commit 9d5e358

File tree

3 files changed

+3
-134
lines changed

3 files changed

+3
-134
lines changed

.github/action.yml

-24
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ inputs:
4545
required: false
4646
default: false
4747
type: boolean
48-
outputs:
49-
container-group:
50-
description: "Container Group"
51-
value: ${{ steps.container-output.outputs.group }}
5248
runs:
5349
using: composite
5450
steps:
@@ -82,26 +78,6 @@ runs:
8278
COMPOSE_PROJECT_NAME=${{ env.project-number }} \
8379
${{ inputs.env_overrides }} docker compose -p ${{ env.project-number }} push
8480
working-directory: ${{ inputs.group_dir }}
85-
- name: Print Containers
86-
id: container-output
87-
shell: bash
88-
run: |
89-
mkdir matrix
90-
images=$(REGISTRY=${{ inputs.registry }} \
91-
REPO=${{ inputs.repo }} \
92-
COMPOSE_PROJECT_NAME=${{ env.project-number }} \
93-
${{ inputs.env_overrides }} docker compose -p ${{ env.project-number }} images --format json)
94-
for image in $(echo $images | jq -r --arg registry "$REGISTRY" '.[] | select(.Repository | contains($registry)) | .Tag'); do
95-
echo "$image" > matrix/$image.txt
96-
done
97-
echo "group=${{ inputs.group_dir }}" | tr '/' '_' >> $GITHUB_OUTPUT
98-
working-directory: ${{ inputs.group_dir }}
99-
- uses: actions/upload-artifact@v4
100-
with:
101-
name: ${{ env.project-number }}-${{ steps.container-output.outputs.group }}
102-
path: ${{ inputs.group_dir }}/matrix/*
103-
retention-days: 1
104-
overwrite: true
10581
- name: Un-Tag Containers
10682
if: ${{ always() }}
10783
shell: bash

.github/scan/action.yml

-35
This file was deleted.

.github/workflows/container-ci.yaml

+3-75
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
####################################################################################################
16-
# Secrets
17-
## ACTION_TOKEN
18-
## MLOPS_REF
19-
## MLOPS_REPO
20-
## REGISTRY
21-
## REGISTRY_TOKEN
22-
## REGISTRY_USER
23-
## REPO
24-
####################################################################################################
2515
name: Container CI
2616
permissions: read-all
2717
on:
@@ -75,9 +65,9 @@ on:
7565
required: true
7666
type: string
7767
jobs:
78-
####################################################################################################
79-
# Compose Build
80-
####################################################################################################
68+
####################################################################################################
69+
# Compose Build
70+
####################################################################################################
8171
setup-build:
8272
outputs:
8373
matrix: ${{ steps.build-matrix.outputs.matrix }}
@@ -103,8 +93,6 @@ jobs:
10393
strategy:
10494
matrix: ${{ fromJson(needs.setup-build.outputs.matrix) }}
10595
fail-fast: false
106-
outputs:
107-
group: ${{ steps.build-group.outputs.container-group }}
10896
steps:
10997
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
11098
with:
@@ -128,66 +116,6 @@ jobs:
128116
no-push: ${{ inputs.no_push }}
129117
no-start: ${{ inputs.no_start }}
130118
####################################################################################################
131-
# Trivy Scan
132-
####################################################################################################
133-
setup-scan:
134-
needs: [build-containers]
135-
runs-on: ubuntu-latest
136-
outputs:
137-
matrix: ${{ steps.scan-matrix.outputs.matrix }}
138-
steps:
139-
- name: Harden Runner
140-
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
141-
with:
142-
egress-policy: audit
143-
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
144-
with:
145-
path: matrix
146-
- name: Set Matrix
147-
id: scan-matrix
148-
run: echo "matrix=$(cat matrix/*-${{ needs.build-containers.outputs.group }}/*.txt | jq -R '.' | jq -sc '. | unique')" >> $GITHUB_OUTPUT
149-
scan-containers:
150-
needs: [setup-scan]
151-
if: ${{ !inputs.no_build }}
152-
runs-on: k8-runners
153-
# permissions:
154-
# actions: read
155-
# packages: read
156-
# pull-requests: write
157-
# security-events: write
158-
strategy:
159-
matrix:
160-
container: ${{ fromJSON(needs.setup-scan.outputs.matrix) }}
161-
fail-fast: false
162-
steps:
163-
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
164-
with:
165-
ref: ${{ inputs.ref }}
166-
- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
167-
with:
168-
registry: ${{ secrets.REGISTRY }}
169-
username: ${{ secrets.REGISTRY_USER }}
170-
password: ${{ secrets.REGISTRY_TOKEN }}
171-
- name: Pull Image
172-
run: docker pull ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
173-
- name: Scan Container
174-
uses: intel/ai-containers/.github/scan@5c68c9c8ff7f634fff3abcc17c46970e0b9b0dde # main
175-
with:
176-
image-ref: ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
177-
output: ${{ matrix.container }}-scan.sarif
178-
- name: Cleanup
179-
if: always()
180-
run: docker rmi -f ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
181-
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
182-
with:
183-
name: ${{ matrix.container }}-scan
184-
path: ${{ matrix.container }}-scan.sarif
185-
# - uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
186-
# with:
187-
# sarif_file: '${{ matrix.container }}-scan.sarif'
188-
# category: '${{ matrix.container }}'
189-
# continue-on-error: true
190-
####################################################################################################
191119
# Generic Test Runner
192120
####################################################################################################
193121
setup-test:

0 commit comments

Comments
 (0)