Skip to content

Gaia Linux Build Release #19

Gaia Linux Build Release

Gaia Linux Build Release #19

name: Gaia Linux Build Release
on:
workflow_dispatch:
inputs:
version_regex:
description: "The regex to filter the version (e.g. '^v18')"
required: true
go_version:
description: "The go version to download and use."
default: "1.22.4"
# push:
jobs:
collect_remote_release:
name: Read latest gaia release
runs-on: ubuntu-latest
outputs:
releases: ${{ steps.query_release.outputs.releases }}
steps:
- name: Query releases
id: query_release
run: |
releases=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/cosmos/gaia/releases | jq --arg v "$regex" -c '[.[].tag_name | select(test($v))]')
echo "releases=$releases" >> "$GITHUB_OUTPUT"
env:
regex: ${{ github.event.inputs.version_regex || '^v1[6-9]' }}
build-binary:
name: Build binary
runs-on: ubuntu-latest
needs: [collect_remote_release]
strategy:
matrix:
release: ${{fromJson(needs.collect_remote_release.outputs.releases)}}
permissions:
contents: write
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Build and release
uses: ./.github/actions/build-gaiad-binary
with:
ref: ${{ matrix.release }}
release_name: ${{ matrix.release }}
remote_commit_sha: ${{ matrix.release }}
github_token: ${{ secrets.GITHUB_TOKEN }}
bot_token: ${{ secrets.HYPHA_BOT_ACTIONS_TOKEN }}
go_version: ${{ github.event.inputs.go_version }}
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
needs: [collect_remote_release]
strategy:
matrix:
release: ${{fromJson(needs.collect_remote_release.outputs.releases)}}
permissions: write-all
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: strangelove-ventures/[email protected]
with:
chain: gaia
tag: ${{ matrix.release }}
git-ref: ${{ matrix.release }}
github-organization: cosmos
github-repo: gaia
additional-args: "--go-version=${{ inputs.go_version }}"
heighliner-tag: v1.6.3