ale8k is updating trivy DB mirror #235
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
name: Mirror Trivy DB | |
run-name: ${{ github.actor }} is updating trivy DB mirror | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */6 * * *' | |
jobs: | |
mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Install ORAS" | |
uses: oras-project/setup-oras@v1 | |
- name: "Pull trivy-db" | |
run: oras pull ghcr.io/aquasecurity/trivy-db:2 | |
- name: "Log in to GHCR with ORAS" | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | oras login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: "Mirror trivy db" | |
run: oras cp ghcr.io/aquasecurity/trivy-db:2 ghcr.io/${{ github.repository }}/trivy-db:2 |