Add a build for gaiad linux tags #3
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: Gaia Linux Build Release v17 | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
collect_remote_release: | |
name: Read latest gaia release | |
runs-on: ubuntu-latest | |
outputs: | |
releases: ${{ steps.query_release.outputs.releases }} | |
steps: | |
- name: Query latest release of the gaia repo | |
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 -c '[.[].tag_name | select(test("v$MAJOR\\..*"))]' --arg MAJOR 17) | |
echo "releases=$releases" >> "$GITHUB_OUTPUT" | |
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 }} | |
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=1.21.10" |