Skip to content

Commit 3b1d2a0

Browse files
authored
chore: update go and git images (#273)
- Update dockerfile images - Rename trivy action and update images
1 parent 3ad8be4 commit 3b1d2a0

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/ast-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches:
88
- main
99
schedule:
10-
- cron: '30 9 * * *'
10+
- cron: '00 7 * * *'
1111

1212
jobs:
1313
cx-scan:
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
# Note: This workflow only updates the cache. You should create a separate workflow for your actual Trivy scans.
2+
# In your scan workflow, set TRIVY_SKIP_DB_UPDATE=true and TRIVY_SKIP_JAVA_DB_UPDATE=true.
13
name: Update Trivy Cache
24

35
on:
46
schedule:
5-
- cron: '0 0 * * *' # Run daily at midnight UTC
6-
workflow_dispatch: # Allow manual triggering
7+
- cron: '0 0 * * *' # Run daily at midnight UTC
8+
workflow_dispatch: # Allow manual triggering
79

810
jobs:
911
update-trivy-db:
1012
runs-on: ubuntu-latest
1113
steps:
1214
- name: Setup oras
13-
uses: oras-project/setup-oras@9c92598691bfef1424de2f8fae81941568f5889c # v1.2.1
15+
uses: oras-project/setup-oras@5c0b487ce3fe0ce3ab0d034e63669e426e294e4d #v1.2.2
1416

1517
- name: Get current date
1618
id: date
@@ -31,7 +33,7 @@ jobs:
3133
rm javadb.tar.gz
3234
3335
- name: Cache DBs
34-
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.2.1
36+
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
3537
with:
3638
path: ${{ github.workspace }}/.cache/trivy
3739
key: cache-trivy-${{ steps.date.outputs.date }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# and "Missing User Instruction" since 2ms container is stopped after scan
44

55
# Builder image
6-
FROM cgr.dev/chainguard/go@sha256:36fee4a2334d13bbf585ad2225ea1ca99fe65de366022e561ac157de26fd5ed6 AS builder
6+
FROM cgr.dev/chainguard/go@sha256:2453e92671fb693999e65fde99bbd5744b120b7dd70f3f7c7b220e185ec35050 AS builder
77

88
WORKDIR /app
99

@@ -20,7 +20,7 @@ COPY . .
2020
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -a -o /app/2ms .
2121

2222
# Runtime image
23-
FROM cgr.dev/chainguard/git@sha256:1169e026c3296ffa346bc2035f08a3397a22cc72753669a943435518022fd270
23+
FROM cgr.dev/chainguard/git@sha256:9e3ec4c4f1465ac810a7e4335d458582c43ad4e8dbaf8ab3a74f8f2a7fdffec2
2424

2525
WORKDIR /app
2626

0 commit comments

Comments
 (0)