Skip to content

fix: quote output of init command and args to prevent multiline log (… #39

fix: quote output of init command and args to prevent multiline log (…

fix: quote output of init command and args to prevent multiline log (… #39

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
permissions:
# Required to publish a release
contents: write
# Necessary to push docker images to ghcr.io.
packages: write
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
id-token: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Workaround for actions/checkout#1467
- name: Fetch tags
run: |
git fetch --tags --depth 1 --force
- name: Echo Go Cache Paths
id: go-cache-paths
run: |
echo "GOCACHE=$(go env GOCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
echo "GOMODCACHE=$(go env GOMODCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.GOCACHE }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.**', '**.go') }}
- uses: actions/setup-go@v3
with:
go-version: "~1.22"
- name: Docker Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get version
id: get-version
env:
ENVBUILDER_RELEASE: "t"
run: |
echo "ENVBUILDER_VERSION=$(./scripts/version.sh)" >> $GITHUB_OUTPUT
- name: Build and Push
env:
VERSION: "${{ steps.get-version.outputs.ENVBUILDER_VERSION }}"
BASE: "ghcr.io/coder/envbuilder"
run: |
./scripts/build.sh \
--arch=amd64 \
--arch=arm64 \
--arch=arm \
--base=$BASE \
--tag=$VERSION \
--push