Skip to content

Fixed a issue in trivy_scan.yaml #2

Fixed a issue in trivy_scan.yaml

Fixed a issue in trivy_scan.yaml #2

Workflow file for this run

name: Image Extracting and Security Scanning
on:
push:
branches:
- master
jobs:
# This job will run the image scan scripts
image-scan:
runs-on: ubuntu-latest
steps:
# Checkout the code from repository
- name: Checkout code
uses: actions/checkout@v3
# Install kustomize
- name: Install kustomize
run: |
sudo apt update
sudo apt install snapd
sudo snap install kustomize
# Install trivy
- name: Install trivy
run: |
sudo apt update
sudo snap install trivy
# Install jq
- name: Install jq
run: |
sudo apt update
sudo apt install jq
# Install Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
# Install prettytable package
- name: Install prettytable
run: |
pip install prettytable
# Run the shell script (extract_images.sh)
- name: Run image extracting and security scanning script
run: |
cd hack
chmod +x trivy_scan.sh
./extract_images.sh
# Upload the artifact
- name: Upload trivy scanned_results
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: docs/image_lists/