diff --git a/.github/Dockerfile.amd64 b/.github/Dockerfile.amd64 new file mode 100644 index 00000000..3a49649c --- /dev/null +++ b/.github/Dockerfile.amd64 @@ -0,0 +1,7 @@ +FROM debian:stable-20231120 +RUN apt-get update --yes && \ + apt-get install --no-install-recommends --yes git ca-certificates && \ + rm -rf /var/lib/apt/lists/* +COPY pint-linux-amd64 /usr/local/bin/pint +WORKDIR /code +CMD ["/usr/local/bin/pint"] diff --git a/.github/Dockerfile.arm64 b/.github/Dockerfile.arm64 new file mode 100644 index 00000000..a24eb427 --- /dev/null +++ b/.github/Dockerfile.arm64 @@ -0,0 +1,7 @@ +FROM debian:stable-20231120 +RUN apt-get update --yes && \ + apt-get install --no-install-recommends --yes git ca-certificates && \ + rm -rf /var/lib/apt/lists/* +COPY pint-linux-arm64 /usr/local/bin/pint +WORKDIR /code +CMD ["/usr/local/bin/pint"] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index de3a0451..ecb8f5a7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,14 @@ updates: directory: "/" schedule: interval: "weekly" + - package-ecosystem: "docker" + directory: "/.github" + schedule: + interval: "weekly" + groups: + debian: + patterns: + - "debian" - package-ecosystem: "gomod" directory: "/" schedule: diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index b7217b2a..25bdf137 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -52,3 +52,10 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Test releasing binaries + if: github.event_name == 'pull_request' + uses: goreleaser/goreleaser-action@v5 + with: + version: v1.21.2 + args: release --clean --skip=validate --skip=sign --skip=sbom --skip=publish --snapshot diff --git a/.goreleaser.yml b/.goreleaser.yml index b97c7b5e..8ea2d457 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,6 +15,7 @@ builds: goarch: arm64 no_unique_dist_dir: true binary: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" + archives: - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" checksum: @@ -25,16 +26,18 @@ release: extra_files: - glob: ./README.md - glob: ./docs/changelog.md + changelog: use: github sort: asc filters: exclude: - "^Merge pull request " + dockers: - image_templates: ["ghcr.io/cloudflare/{{ .ProjectName }}:{{ .Version }}-amd64"] - dockerfile: Dockerfile + dockerfile: .github/Dockerfile.amd64 use: buildx build_flag_templates: - --platform=linux/amd64 @@ -46,17 +49,11 @@ dockers: - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} - --label=org.opencontainers.image.revision={{ .FullCommit }} - --label=org.opencontainers.image.licenses=Apache-2.0 - extra_files: - - .git - - cmd - - internal - - go.mod - - go.sum - - Makefile + - image_templates: ["ghcr.io/cloudflare/{{ .ProjectName }}:{{ .Version }}-arm64"] goarch: arm64 - dockerfile: Dockerfile + dockerfile: .github/Dockerfile.arm64 use: buildx build_flag_templates: - --platform=linux/arm64 @@ -68,13 +65,7 @@ dockers: - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} - --label=org.opencontainers.image.revision={{ .FullCommit }} - --label=org.opencontainers.image.licenses=Apache-2.0 - extra_files: - - .git - - cmd - - internal - - go.mod - - go.sum - - Makefile + docker_manifests: - name_template: ghcr.io/cloudflare/{{ .ProjectName }}:{{ .Version }} image_templates: