Skip to content

Make docker images scanner weekly and triggered on allowed images update #145

Make docker images scanner weekly and triggered on allowed images update

Make docker images scanner weekly and triggered on allowed images update #145

name: "Scan docker images from the allowed docker images list"

Check failure on line 1 in .github/workflows/scan-docker-images.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/scan-docker-images.yml

Invalid workflow file

`schedule` list items require the `cron` key to be set
on:
# we should run this job if somebody wants to add/update allowed docker images
pull_request:
paths:
- 'tests/tck-build-logic/src/main/resources/allowed-docker-images'
# we should run this job once a week to check if new vulnerabilities are found in existing images
schedule:
- chron: "0 0 * * 6"
jobs:
scan-images:
name: "🔎 Scan docker images"
runs-on: "ubuntu-20.04"
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "🔎 Check docker images"
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b /usr/local/bin
sudo apt-get install jq
./gradlew checkAllowedDockerImages