Skip to content

Commit

Permalink
fixed daily cron job for Trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
brucehoff committed Aug 4, 2024
1 parent e183ba3 commit e5770f3
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/trivy_periodic_image_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@ on:
- cron: "0 0 * * *"

jobs:
trivy-matrix:
name: periodic scan
lower-case:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Ensure image name is lower case
id: image_name
uses: vishalmamidi/lowercase-action@v1
with:
string: ghcr.io/${{ github.repository }}:main
outputs:
lowercase: ${{ steps.image_name.outputs.lowercase }}

- name: Run Trivy
uses: "./.github/workflows/trivy.yml"
with:
SOURCE_TYPE: image
IMAGE_NAME: ${{ steps.image_name.outputs.lowercase }}
periodic-scan:
needs: lower-case
uses: "./.github/workflows/trivy.yml"
with:
SOURCE_TYPE: image
IMAGE_NAME: ${{ needs.lower-case.outputs.lowercase }}
...

0 comments on commit e5770f3

Please sign in to comment.