diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 365eeec..5c6eda2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,9 +3,15 @@ updates: - package-ecosystem: github-actions directory: / schedule: - interval: daily + interval: weekly + groups: + actions: + patterns: ["*"] - package-ecosystem: docker directory: / schedule: - interval: daily + interval: weekly + groups: + docker: + patterns: ["*"] diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e3aaf53..9cab1f0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -26,10 +26,6 @@ jobs: - name: checkout repo uses: actions/checkout@v4 - - name: Install cosign - if: ${{ github.ref_type == 'tag' }} - uses: sigstore/cosign-installer@v3 - - name: Login to Github Registry uses: docker/login-action@v3 if: github.event_name != 'pull_request' @@ -53,11 +49,10 @@ jobs: type=semver,pattern={{version}} type=ref,event=branch - - name: Build with tag and push - id: docker-build-push + - name: Build uses: docker/build-push-action@v5 with: - push: ${{ github.ref_type == 'tag' }} + push: true pull: true platforms: linux/amd64,linux/arm64 tags: ${{ steps.docker-meta.outputs.tags }} @@ -65,10 +60,26 @@ jobs: annotations: ${{ steps.docker-meta.outputs.annotations }} cache-from: type=gha cache-to: type=gha,mode=max + target: latest + + - name: Docker meta for debug target + id: docker-meta-debug + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}},suffix=debug + type=ref,event=branch,suffix=debug - - name: Sign the published Docker image - if: ${{ github.ref_type == 'tag' }} - env: - TAGS: ${{ steps.docker-meta.outputs.tags }} - DIGEST: ${{ steps.docker-build-push.outputs.digest }} - run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} + - name: Build debug + uses: docker/build-push-action@v5 + with: + push: true + pull: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.docker-meta-debug.outputs.tags }} + labels: ${{ steps.docker-meta-debug.outputs.labels }} + annotations: ${{ steps.docker-meta-debug.outputs.annotations }} + cache-from: type=gha + cache-to: type=gha,mode=max + target: debug diff --git a/Dockerfile b/Dockerfile index 7abfab0..abefb6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,12 @@ ARG VERSION=v1.13.12 RUN git clone --quiet --branch ${VERSION} --depth 1 https://github.com/ethereum/go-ethereum . RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build go run build/ci.go install -static ./cmd/geth -FROM gcr.io/distroless/base-debian12:latest +FROM gcr.io/distroless/base-debian12:latest as latest COPY --from=BUILDER /geth/build/bin/geth /usr/local/bin/ EXPOSE 8545 8546 8551 30303 30303/udp USER 65532 ENTRYPOINT ["geth"] + +FROM alpine:3.19.1 as debug +COPY --from=BUILDER /geth/build/bin/geth /usr/local/bin/ +ENTRYPOINT ["geth"]