Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Caching to scan-container #463

Merged
merged 10 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/scan/action.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/container-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ jobs:
- name: Pull Image
run: docker pull ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
- name: Scan Container
uses: intel/ai-containers/.github/scan@main
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
with:
cache: true
format: sarif
github-pat: ${{ secrets.GITHUB_TOKEN }}
image-ref: ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
output: ${{ matrix.container }}-scan.sarif
timeout: 30m0s
- name: Cleanup
if: always()
run: docker rmi -f ${{ secrets.REGISTRY }}/${{ secrets.REPO }}:${{ matrix.container }}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ jobs:
id: summary
shell: bash
run: |
SUMMARY=$(find . -maxdepth 3 -name '*summary.json' -print)
SUMMARY=$(find . -maxdepth 1 -name '*summary.json' -print)
if [[ -n "$SUMMARY" ]]; then
echo "summary=$SUMMARY" >> "$GITHUB_OUTPUT"
echo "Files matching the pattern test-runner-summary*.json found in the directory"
summary_dir=$(dirname "$SUMMARY")
jq -s '[.[] | .[]]' $summary_dir/*summary.json > combined.json
echo "summary=true" >> $GITHUB_OUTPUT
echo "Files matching the pattern ./*summary.json"
jq -s '[.[] | .[]]' ./*summary.json > combined.json
echo "Files found in the directory"
else
echo "summary=false" >> "$GITHUB_OUTPUT"
echo "No files matching the pattern test-runner-summary*.json found in the directory"
echo "summary=false" >> $GITHUB_OUTPUT
echo "No files matching the pattern ./*summary.json"
fi
- name: Generate TXT file
if: ${{ steps.summary.outputs.summary != 'false' }}
Expand All @@ -118,7 +117,7 @@ jobs:
fi
} >> output.txt
- name: PR-comment
if: ${{ steps.summary.outputs.summary == 'true' }}
if: ${{ steps.summary.outputs.summary != 'false' }}
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down