File tree Expand file tree Collapse file tree 4 files changed +25
-15
lines changed Expand file tree Collapse file tree 4 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -24,25 +24,32 @@ jobs:
2424 - name : Checkout repository
2525 uses : actions/checkout@v4
2626
27+ - name : Set up QEMU
28+ uses : docker/setup-qemu-action@v3
29+ - name : Set up Docker Buildx
30+ uses : docker/setup-buildx-action@v3
31+
2732 - name : Log in to the Container registry
28- uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
33+ uses : docker/login-action@v3
2934 with :
3035 registry : ${{ env.REGISTRY }}
3136 username : ${{ github.actor }}
3237 password : ${{ secrets.GITHUB_TOKEN }}
3338
3439 - name : Extract metadata (tags, labels) for Docker
3540 id : meta
36- uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
41+ uses : docker/metadata-action@v5
3742 with :
3843 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3944
4045 - name : Build and push Docker image
4146 id : push
42- uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
47+ uses : docker/build-push-action@v6
4348 with :
4449 context : .
4550 push : true
51+ platforms : linux/amd64,linux/arm64
52+ provenance : false
4653 tags : ${{ steps.meta.outputs.tags }}
4754 labels : ${{ steps.meta.outputs.labels }}
4855
Original file line number Diff line number Diff line change @@ -24,27 +24,34 @@ jobs:
2424 - name : Checkout repository
2525 uses : actions/checkout@v4
2626
27+ - name : Set up QEMU
28+ uses : docker/setup-qemu-action@v3
29+ - name : Set up Docker Buildx
30+ uses : docker/setup-buildx-action@v3
31+
2732 - name : Log in to the Container registry
28- uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
33+ uses : docker/login-action@v3
2934 with :
3035 registry : ${{ env.REGISTRY }}
3136 username : ${{ github.actor }}
3237 password : ${{ secrets.GITHUB_TOKEN }}
3338
3439 - name : Extract metadata (tags, labels) for Docker
3540 id : meta
36- uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
41+ uses : docker/metadata-action@v5
3742 with :
3843 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3944
4045 - name : Build and push Docker image
4146 id : push
42- uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
47+ uses : docker/build-push-action@v6
4348 with :
4449 context : .
4550 push : true
4651 tags : ${{ steps.meta.outputs.tags }}
4752 labels : ${{ steps.meta.outputs.labels }}
53+ platforms : linux/amd64,linux/arm64
54+ provenance : false
4855
4956 - name : Generate artifact attestation
5057 uses : actions/attest-build-provenance@v1
Original file line number Diff line number Diff line change 1- FROM golang:1.24-alpine3.22 as builder
1+ FROM golang:1.25-alpine3.22 AS builder
2+ ARG TARGETOS TARGETARCH TARGETVARIANT
23WORKDIR /app
34COPY . .
4- RUN
5- RUN go build -ldflags "-s -w" -o main main.go
5+ RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-s -w" -o main main.go
66
77FROM alpine:3.22
8- RUN apk update
9- RUN apk upgrade --no-cache libcrypto3 libssl3 openssl
10- RUN apk --no-cache add ca-certificates
8+ RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 openssl && apk --no-cache add ca-certificates
119RUN addgroup -S app && adduser -S app -G app
1210WORKDIR /app
1311COPY --from=builder /app/main .
Original file line number Diff line number Diff line change 11module github.com/csepulveda/trivy-webhook-aws-security-hub
22
3- go 1.24.4
4-
5- toolchain go1.24.5
3+ go 1.25.4
64
75require (
86 github.com/aquasecurity/trivy-operator v0.27.2
You can’t perform that action at this time.
0 commit comments