Skip to content

Commit

Permalink
Use cache to store clair db file
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Sep 30, 2024
1 parent ce9a9b8 commit 80bb4ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/actions/docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ runs:
- name: Save Docker image
shell: bash
run: docker save -o ${{ github.sha }} ${{ inputs.image }}
- name: Update Clair DB
uses: quay/clair-action@3d70e770073b9ac97fc7a7e800822fee52f5cb22 # refs/tags/v0.0.9
- name: Grab cache DB
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # refs/tags/v4.0.2
with:
db-file: matcher.db
mode: update
path: matcher.db
key: matcher.db
- name: Check security vulnerabilities
uses: quay/clair-action@3d70e770073b9ac97fc7a7e800822fee52f5cb22 # refs/tags/v0.0.9
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,18 @@ jobs:
COMMIT_NAME: "gh versions bot"
PR_BRANCH_NAME: "gh-versions-update-${PR_ID}"
PR_TITLE: "chore: update gh"
update-clair-db:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # refs/tags/v3.2.0
- uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # refs/tags/v3.6.1
- name: Get DB file
uses: quay/clair-action@3d70e770073b9ac97fc7a7e800822fee52f5cb22 # refs/tags/v0.0.9
with:
db-file: matcher.db
mode: update
- name: Store DB in cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # refs/tags/v4.0.2
with:
path: matcher.db
key: matcher.db

0 comments on commit 80bb4ba

Please sign in to comment.