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

trivy db image sync job #176

Merged
merged 1 commit into from
Oct 16, 2024
Merged
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
29 changes: 29 additions & 0 deletions .github/workflows/trivy-sync-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Periodic trivy db copy job

# Run every hour
on:
schedule:
- cron: '0 * * * *' # Runs every hour at the top of the hour

jobs:
copy-oci-trivy-db-image:
runs-on: ubuntu-latest
permissions:
packages: write # for GHCR write access

steps:
# Set up ORAS cli
- uses: oras-project/setup-oras@v1

# Authenticate to the source and target registries (GitHub Container Registry)
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Copy the OCI image from Aqua Security to Kedacore
- name: Copy OCI image using ORAS
run: |
oras cp ghcr.io/aquasecurity/trivy-db:2 ghcr.io/kedacore/trivy-db:2
Loading