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

chore: short-lived grype-db cache #348

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# force unix line endings for consistent ncc output
*.js text eol=lf
package.json text eol=lf
package-lock.json text eol=lf
12 changes: 8 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: node --version
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run audit
- run: npm run build
- run: git status --porcelain
- run: git diff
- run: git diff --ws-error-highlight=all | cat -v
- run: git diff --exit-code

test:
Expand Down Expand Up @@ -53,22 +57,22 @@ jobs:
path: ./

- name: "Donwload Grype v0.54.0"
id: grype
uses: ./download-grype # anchore/scan-action/download-grype
with:
grype-version: v0.54.0

- name: "Check Grype version before scan-action"
run: grype version | egrep "^Version:.*0.54.0$"
run: ${{ steps.grype.outputs.cmd }} version | egrep "^Version:.*0.54.0$"

- name: "Scan test image"
uses: ./
with:
image: "alpine:latest"
grype-version: v0.54.0 # set the same version to test that current Grype binary wasn't overwritten by the latest version
fail-build: false # to prevent fail due to vuln:s on test image

- name: "Check Grype version after scan-action"
run: grype version | egrep "^Version:.*0.54.0$"
run: ${{ steps.grype.outputs.cmd }} version | egrep "^Version:.*0.54.0$"

test-all:
strategy:
Expand Down
Loading
Loading