Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
The release workflow stopped working. This commit fixes it and
also updates actions used by it.
  • Loading branch information
ido50 committed Jun 11, 2024
1 parent 0fc48d4 commit e01676c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 95 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,42 @@ on:
push:
tags:
- "v*"

workflow_call:
permissions:
id-token: write # For cosign
packages: write # For GHCR
contents: write # For goreleaser
jobs:
release:
name: Release
uses: ./.github/workflows/reusable-release.yaml
with:
goreleaser_config: goreleaser.yml
goreleaser_options: '--rm-dist --timeout 90m'
secrets: inherit
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Show available Docker Buildx platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to ghcr.io registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required by goreleaser-action for changelog to work

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: release -f=goreleaser.yml --clean --timeout 90m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62 changes: 0 additions & 62 deletions .github/workflows/reusable-release.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17.0
FROM alpine:3.20
RUN apk --no-cache add ca-certificates git
COPY aiac /usr/local/bin/aiac
ENTRYPOINT ["aiac"]
36 changes: 10 additions & 26 deletions goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: aiac
builds:
- main: main.go
Expand All @@ -24,32 +25,15 @@ builds:
ignore:
- goos: darwin
goarch: 386
# modernc.org/sqlite doesn't support the following pairs
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: arm64

archives:
- format: tar.gz
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
ppc64le: PPC64LE
darwin: macOS
linux: Linux
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
brews:
- tap:
- repository:
owner: gofireflyio
name: homebrew-aiac
homepage: "https://github.com/gofireflyio/aiac"
Expand All @@ -74,8 +58,8 @@ dockers:
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.source=https://github.com/gofireflyio/aiac"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.url=https://www.gofirefly.io/"
- "--label=org.opencontainers.image.documentation=https://gofirefly.io/"
- "--label=org.opencontainers.image.url=https://www.firefly.ai/"
- "--label=org.opencontainers.image.documentation=https://firefly.ai/"
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/gofireflyio/aiac:{{ .Version }}-arm64"
Expand All @@ -93,8 +77,8 @@ dockers:
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.source=https://github.com/gofireflyio/aiac"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.url=https://www.gofirefly.io"
- "--label=org.opencontainers.image.documentation=https://www.gofirefly.io/"
- "--label=org.opencontainers.image.url=https://www.firefly.ai/"
- "--label=org.opencontainers.image.documentation=https://www.firefly.ai/"
- "--platform=linux/arm64"
- image_templates:
- "ghcr.io/gofireflyio/aiac:{{ .Version }}-s390x"
Expand All @@ -112,8 +96,8 @@ dockers:
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.source=https://github.com/gofireflyio/aiac"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.url=https://www.gofirefly.io"
- "--label=org.opencontainers.image.documentation=https://www.gofirefly.io/"
- "--label=org.opencontainers.image.url=https://www.firefly.ai/"
- "--label=org.opencontainers.image.documentation=https://www.firefly.ai/"
- "--platform=linux/s390x"
- image_templates:
- "ghcr.io/gofireflyio/aiac:{{ .Version }}-ppc64le"
Expand All @@ -131,8 +115,8 @@ dockers:
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.source=https://github.com/gofireflyio/aiac"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.url=https://www.gofirefly.io"
- "--label=org.opencontainers.image.documentation=https://www.gofirefly.io/"
- "--label=org.opencontainers.image.url=https://www.firefly.ai/"
- "--label=org.opencontainers.image.documentation=https://www.firefly.ai/"
- "--platform=linux/ppc64le"

docker_manifests:
Expand Down

0 comments on commit e01676c

Please sign in to comment.