Skip to content

isabella232/xgoreleaser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oryd/xgoreleaser

This image is published as oryd/xgoreleaser. It's tag (e.g. 1.13.5) reflects the Golang version used. This is a fork of docker/golang-cross. Alternatives include:

Build in CI

First, check the versions for:

The use this workflow to build and publish the image. Do not use v prefixes in the version!

Workflow parameters

Using the Build Tempalte

# Include the base config
includes:
  - from_url:
      url: https://raw.githubusercontent.com/ory/xgoreleaser/master/build.tmpl.yml

variables:
  # The name of the brew tap formula:
  # 
  # brew install ory/tap/<brew_name>
  brew_name: cli

  # The description of the brew formula:
  brew_description: ""
  
  # The variable where we store the build's git hash
  buildinfo_hash: "github.com/ory/cli/buildinfo.GitHash"

  # The variable where we store the build's version
  buildinfo_tag: "github.com/ory/cli/buildinfo.Version"

  # The variable where we store the build's time
  buildinfo_date: "github.com/ory/cli/buildinfo.Time"


# The name of the project (e.g. kratos, ory, ...). Used
# to name the binary, docker images, etc.
project_name: ory

Building Locally

To build this image, run locally:

# Enable Docker experimental features and buildx
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --use

go_version=1.17.5
goreleaser_version=1.1.0
docker buildx build \
  --load \
  --build-arg GO_VERSION=${go_version} --build-arg GORELEASER_VERSION=${goreleaser_version} \
  --platform linux/amd64 \
  -t oryd/xgoreleaser:${go_version}-${goreleaser_version} \
  -t oryd/xgoreleaser:latest \
  .

To build this image using the CI, create a new release with the desired Golang version.

Testing Builds

You can test a build using

docker pull --platform linux/amd64 oryd/xgoreleaser:latest
docker run --mount type=bind,source="$(pwd)",target=/project \
    --platform linux/amd64 \
    -e GORELEASER_KEY=$GORELEASER_KEY \
    -v /var/run/docker.sock:/var/run/docker.sock \
    oryd/xgoreleaser:latest --skip-publish --snapshot --rm-dist

or exec into the container:

docker run --mount type=bind,source="$(pwd)",target=/project \
  --platform linux/amd64 \
  -e GORELEASER_KEY=$GORELEASER_KEY \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --entrypoint /bin/bash -it oryd/xgoreleaser:latest

Updating Dependencies

Go tends to remove support for older macOS SDKs which requires re-packaging and uploading the macOS SDK to Google Cloud. To learn how to package it, check out this guide. Next, upload the generated file and mark it public in this Google Cloud Storage Bucket.

Updating Build Template

The build template is ingested by all projects (e.g. Ory Kratos) and modified slightly to fit the needs of the project.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 77.0%
  • Shell 21.4%
  • Go 1.6%