Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true

- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0

- name: Configure Git
run: |
git config user.name "planetscale-cli[bot]"
Expand Down
28 changes: 26 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,40 @@ builds:
binary: "pscale"
dockers:
- image_templates:
- "planetscale/pscale:latest"
- "planetscale/pscale:{{ .Tag }}"
- "planetscale/pscale:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
dockerfile: Dockerfile.goreleaser
- image_templates:
- "planetscale/pscale:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
dockerfile: Dockerfile.goreleaser
docker_manifests:
- name_template: "planetscale/pscale:{{ .Tag }}"
image_templates:
- "planetscale/pscale:{{ .Tag }}-amd64"
- "planetscale/pscale:{{ .Tag }}-arm64"
- name_template: "planetscale/pscale:latest"
image_templates:
- "planetscale/pscale:{{ .Tag }}-amd64"
- "planetscale/pscale:{{ .Tag }}-arm64"
aurs:
-
name: pscale-cli-bin
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile.goreleaser
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ RUN apt-get update --allow-releaseinfo-change || apt-get update; apt-get install

ARG SYFT_VERSION=1.38.0
RUN wget -O syft.deb https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.deb && dpkg -i syft.deb

COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
8 changes: 8 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

docker buildx inspect goreleaser >/dev/null 2>&1 \
|| docker buildx create --name goreleaser --driver docker-container --use
docker buildx use goreleaser

exec goreleaser "$@"