Mirror Trivy DB #453
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow mirrors the Trivy DB into the azimuth-cloud namespace | |
# | |
# This is required, at least for now, to avoid rate-limit errors when using trivy-action | |
# See https://github.com/aquasecurity/trivy-action/issues/389 | |
# N.B. none of the mitigations proposed there appear to fully fix the issue | |
name: Mirror Trivy DB | |
on: | |
# Allow manual executions | |
workflow_dispatch: | |
# Run nightly | |
schedule: | |
- cron: '0 */6 * * *' | |
jobs: | |
mirror_trivy_db: | |
name: Mirror the latest Trivy DB image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Install ORAS | |
uses: oras-project/setup-oras@v1 | |
- name: Log in to ghcr.io using ORAS | |
run: oras login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
- name: Mirror Trivy DB using ORAS | |
run: oras cp ghcr.io/aquasecurity/trivy-db:2 ghcr.io/azimuth-cloud/trivy-db:2 |