Skip to content

hof/deps: update go & cue (#393) #63

hof/deps: update go & cue (#393)

hof/deps: update go & cue (#393) #63

Workflow file for this run

name: release (hof)
"on":
push:
tags:
- v*
env:
HOF_TELEMETRY_DISABLED: "1"
jobs:
goreleaser:
environment: hof mod testing
runs-on: ubuntu-latest
steps:
- name: cancel if not our repository
run: |-
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.repository != 'hofstadter-io/hof'
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Vars
id: vars
run: |-
SHA=${GITHUB_SHA::8}
TAG=$(git tag --points-at HEAD)
echo "HOF_FMT_VERSION=${TAG}" >> $GITHUB_ENV
if [ -z $TAG ]; then
TAG=${SHA}
fi
echo "HOF_SHA=${SHA}" >> $GITHUB_ENV
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Fetch Go deps
run: go mod download
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
workdir: cmd/hof
args: release --clean -f goreleaser.yml -p 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOF_HOMEBREW_PAT: ${{ secrets.HOF_HOMEBREW_PAT }}
strategy: {}
services: {}
formatter:
strategy:
fail-fast: false
matrix:
formatter:
- prettier
- csharpier
- black
environment: hof mod testing
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Vars
id: vars
run: |-
SHA=${GITHUB_SHA::8}
TAG=$(git tag --points-at HEAD)
echo "HOF_FMT_VERSION=${TAG}" >> $GITHUB_ENV
if [ -z $TAG ]; then
TAG=${SHA}
fi
echo "HOF_SHA=${SHA}" >> $GITHUB_ENV
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
uses: docker/build-push-action@v5
with:
context: formatters/tools/${{ matrix.formatter }}
file: formatters/tools/${{ matrix.formatter }}/Dockerfile.debian
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/hofstadter-io/fmt-${{ matrix.formatter }}:${{ env.HOF_SHA }},ghcr.io/hofstadter-io/fmt-${{ matrix.formatter }}:${{ env.HOF_TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
services: {}