diff --git a/.github/workflows/sync-trivy.yml b/.github/workflows/sync-trivy.yml new file mode 100644 index 0000000..71deb66 --- /dev/null +++ b/.github/workflows/sync-trivy.yml @@ -0,0 +1,30 @@ +name: "Sync Trivy" + +on: + push: + branches: + - "main" + schedule: + - cron: "0 2 * * *" + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Login to SIGHUP new Registry + uses: docker/login-action@v3 + with: + registry: registry.sighup.io + username: ${{ secrets.SIGHUP_REGISTRY_USERNAME }} + password: ${{ secrets.SIGHUP_REGISTRY_PASSWORD }} + - name: Install yq + run: | + sudo apt-get update && sudo apt-get install -yqq wget + sudo wget -q https://github.com/mikefarah/yq/releases/download/v4.19.1/yq_linux_amd64 -O /usr/bin/yq + sudo chmod +x /usr/bin/yq + - name: Iterate + run: | + yq --version + docker run --rm quay.io/skopeo/stable:v1.13 --version + ./single_sync.sh modules/trivy/images.yml false diff --git a/modules/trivy/images.yml b/modules/trivy/images.yml new file mode 100644 index 0000000..9710936 --- /dev/null +++ b/modules/trivy/images.yml @@ -0,0 +1,15 @@ +images: + - name: trivy-db [Trivy DB] + source: ghcr.io/aquasecurity/trivy-db + tag: + - "2" + destinations: + - registry.sighup.io/fury-secured/trivy/trivy-db + + - name: trivy-java-db [Trivy java DB] + source: ghcr.io/aquasecurity/trivy-java-db + tag: + - "1" + destinations: + - registry.sighup.io/fury-secured/trivy/trivy-java-db +