Updated extras/demo.png #166
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: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: 0 5 * * 1 | |
env: | |
GO_VERSION: 1.23.5 | |
jobs: | |
build-amd64: | |
name: Build (${{ matrix.platform }} ${{ matrix.architecture }}) | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
platform: | |
- noble | |
- jammy | |
- bookworm | |
- rhel9 | |
architecture: | |
- amd64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./extras/github/build-action | |
with: | |
platform: ${{ matrix.platform }} | |
architecture: ${{ matrix.architecture }} | |
go-version: ${{ env.GO_VERSION }} | |
build-arm64: | |
name: Build (${{ matrix.platform }} ${{ matrix.architecture }}) | |
runs-on: ubuntu-24.04-arm | |
strategy: | |
matrix: | |
platform: | |
- noble | |
- jammy | |
- bookworm | |
- rhel9 | |
architecture: | |
- arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./extras/github/build-action | |
id: attempt1 | |
continue-on-error: true | |
with: | |
platform: ${{ matrix.platform }} | |
architecture: ${{ matrix.architecture }} | |
go-version: ${{ env.GO_VERSION }} | |
# XXX: for ARM64 builds, jobs occasionally fail with an error suggesting | |
# that Docker is not ready. This is a workaround to retry the build once. | |
# >Run ./extras/github/build-action | |
# >Run docker/setup-buildx-action@v3 | |
# >Docker info | |
# >Buildx version | |
# >Inspecting default docker context | |
# >Creating a new builder instance | |
# Error: ERROR: failed to initialize builder builder-7cfe3cdd-acf8-4116-a011-40173ca3d469 | |
# (builder-7cfe3cdd-acf8-4116-a011-40173ca3d4690): Cannot connect to the Docker daemon at | |
# unix:///var/run/docker.sock. Is the docker daemon running? | |
- uses: ./extras/github/build-action | |
if: steps.attempt1.outcome == 'failure' | |
id: attempt2 | |
continue-on-error: true | |
with: | |
platform: ${{ matrix.platform }} | |
architecture: ${{ matrix.architecture }} | |
go-version: ${{ env.GO_VERSION }} | |
# XXX: same as above, but for the second retry. | |
- uses: ./extras/github/build-action | |
if: steps.attempt2.outcome == 'failure' | |
with: | |
platform: ${{ matrix.platform }} | |
architecture: ${{ matrix.architecture }} | |
go-version: ${{ env.GO_VERSION }} | |
release: | |
needs: | |
- build-amd64 | |
- build-arm64 | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }} | |
name: Release | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
# Beware 'Settings' > 'Actions' > 'General' > 'Workflow permissions' > | |
# 'Read and write permissions' is required for this to work. | |
- shell: bash | |
run: | | |
gh release create \ | |
"$GITHUB_REF_NAME" \ | |
--title "$GITHUB_REF_NAME" \ | |
$(find ./artifacts/*-*-artifacts -type f -maxdepth 1) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |