feat: send logs to userspace + revamp (#14) #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: enterprise-release | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
inputs: | |
snapshot: | |
description: Force a dev version to be generated, implies dry_run. | |
type: boolean | |
required: true | |
dry_run: | |
description: Perform a dry-run release. | |
type: boolean | |
required: true | |
permissions: | |
# Required to publish a release | |
contents: write | |
# Necessary to push docker images to ghcr.io. | |
packages: write | |
env: | |
CODER_RELEASE: ${{ github.event.inputs.snapshot && 'false' || 'true' }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
# Necessary for Docker manifest | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# If the event that triggered the build was an annotated tag (which our | |
# tags are supposed to be), actions/checkout has a bug where the tag in | |
# question is only a lightweight tag and not a full annotated tag. This | |
# command seems to fix it. | |
# https://github.com/actions/checkout/issues/290 | |
- name: Fetch git tags | |
run: git fetch --tags --force | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "^1.21.9" | |
- name: Build binaries | |
run: | | |
set -euxo pipefail | |
go mod download | |
version=$(./ci/scripts/version.sh) | |
make -j \ | |
enterprise/build/exectrace_"$version"_linux_{amd64,arm64,armv7} | |
- name: Build Docker images | |
run: | | |
set -euxo pipefail | |
version=$(./ci/scripts/version.sh) | |
make -j \ | |
enterprise/build/exectrace_"$version"_linux_{amd64,arm64,armv7}.tag | |
- name: Push Docker images | |
if: ${{ !github.event.inputs.snapshot && !github.event.inputs.dry_run }} | |
run: | | |
set -euxo pipefail | |
version=$(./ci/scripts/version.sh) | |
make -j \ | |
enterprise/build/exectrace_"$version"_linux_{amd64,arm64,armv7}.tag.pushed | |
- name: Build and push multi-arch Docker image | |
if: ${{ !github.event.inputs.snapshot && !github.event.inputs.dry_run }} | |
run: | | |
set -euxo pipefail | |
version=$(./ci/scripts/version.sh) | |
make -j \ | |
enterprise/build/exectrace_{"$version",latest}_linux.tag.pushed |