Skip to content

feat: lifecycle commands, output formatting, and show-commands mode #98

feat: lifecycle commands, output formatting, and show-commands mode

feat: lifecycle commands, output formatting, and show-commands mode #98

Workflow file for this run

name: Images
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_BASE: ghcr.io/${{ github.repository }}
jobs:
sandbox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.IMAGE_BASE }}
tags: |
type=semver,pattern=sandbox-v{{version}}
type=sha,prefix=sandbox-,format=short
- uses: docker/build-push-action@v6
with:
context: sandbox
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.IMAGE_BASE }}:sandbox-cache
cache-to: type=registry,ref=${{ env.IMAGE_BASE }}:sandbox-cache,mode=max
runner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build harness binary
run: |
VERSION=$(git describe --tags --always 2>/dev/null || echo dev)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags "-s -w -X main.version=${VERSION}" \
-o build/runner/harness .
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.IMAGE_BASE }}
tags: |
type=semver,pattern=runner-v{{version}}
type=sha,prefix=runner-,format=short
- uses: docker/build-push-action@v6
with:
context: build/runner
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.IMAGE_BASE }}:runner-cache
cache-to: type=registry,ref=${{ env.IMAGE_BASE }}:runner-cache,mode=max