mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
PRODUCTION_GITHUB_REPOSITORY was still hardcoded to the upstream org/repo, so every derived name (builder, runtime, frontend image) resolved under ghcr.io/railwayapp/*. Flipping this one knob is enough: the existing template arithmetic in mise.ci.toml already produces ghcr.io/hanzoai/pack-builder, ghcr.io/hanzoai/pack-runtime, and ghcr.io/hanzoai/pack-frontend from it, matching how the rest of the repo (hanzo.yml, README, go.mod) already names this project. Also pins goreleaser's project_name explicitly instead of leaving it to implicit directory-name inference, since install.sh's download URL has to agree with whatever name goreleaser gives its release archives. Removes an unused IMAGE_NAME env var left over in the publish-runtime job. This does not yet change what `pack build` pulls at runtime (core/generate and core/plan still point at railwayapp) or install.sh (hanzoai/pack has no releases yet) -- both wait on this pipeline actually publishing once. Co-authored-by: Hanzo Dev <[email protected]>
85 lines
2.9 KiB
YAML
85 lines
2.9 KiB
YAML
# run automatically when a tag is created by the release.yml workflow
|
|
version: 2
|
|
|
|
# pinned explicitly: archive names derive from this, and install.sh depends
|
|
# on that name matching its own REPO_NAME
|
|
project_name: pack
|
|
|
|
# TODO replace with a `go mod tidy -check` when go is upgraded
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
|
|
builds:
|
|
- id: cli
|
|
main: ./cmd/cli
|
|
binary: railpack
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}
|
|
|
|
archives:
|
|
- formats: [tar.gz]
|
|
name_template: >-
|
|
{{ .ProjectName }}-v{{ .Version }}-
|
|
{{- if and (eq .Arch "amd64") (eq .Os "darwin") }}x86_64-apple-darwin
|
|
{{- else if and (eq .Arch "arm64") (eq .Os "darwin") }}arm64-apple-darwin
|
|
{{- else if and (eq .Arch "amd64") (eq .Os "linux") }}x86_64-unknown-linux-musl
|
|
{{- else if and (eq .Arch "arm64") (eq .Os "linux") }}arm64-unknown-linux-musl
|
|
{{- else if and (eq .Arch "amd64") (eq .Os "windows") }}x86_64-pc-windows-msvc
|
|
{{- else if and (eq .Arch "arm64") (eq .Os "windows") }}arm64-pc-windows-msvc
|
|
{{- else }}{{ .Arch }}-{{ .Os }}{{ end }}
|
|
format_overrides:
|
|
- goos: windows
|
|
formats: [zip]
|
|
|
|
# build a multi-arch railpack frontend image to be used by buildkit to convert a repo (and any railpack.json) into docker llb
|
|
# the railpack build and runtime images are created separately. This image bundles the freshly compiled railpack binary
|
|
# which is why we build the images here instead of GHA.
|
|
dockers:
|
|
- image_templates:
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-amd64"
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-amd64"
|
|
use: buildx
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/amd64"
|
|
dockerfile: images/alpine/frontend/goreleaser.Dockerfile
|
|
- image_templates:
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-arm64"
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-arm64"
|
|
use: buildx
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/arm64"
|
|
goarch: arm64
|
|
dockerfile: images/alpine/frontend/goreleaser.Dockerfile
|
|
|
|
docker_manifests:
|
|
- name_template: "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}"
|
|
image_templates:
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-amd64"
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-arm64"
|
|
- name_template: "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest"
|
|
image_templates:
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-amd64"
|
|
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-arm64"
|
|
|
|
changelog:
|
|
use: github-native
|
|
|
|
checksum:
|
|
name_template: 'checksums.txt'
|
|
|
|
release:
|
|
prerelease: auto
|
|
name_template: "{{.ProjectName}} v{{.Version}}"
|
|
include_meta: true |