fix: return ARM64 build to ubuntu-24.04-arm #130
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| jobs: | |
| agents: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| strategy: | |
| matrix: | |
| agent: | |
| - chat | |
| - rag | |
| - form | |
| - canvas | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - id: version | |
| run: | | |
| echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| echo "latestTag=$([[ ${GITHUB_REF#refs/tags/v} =~ [a-zA-Z] ]] && echo prerelease || echo latest)" >> $GITHUB_OUTPUT | |
| - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| registry: quay.io | |
| username: beeai+github | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: . | |
| file: ./agents/${{ matrix.agent }}/Dockerfile | |
| push: false | |
| load: true | |
| build-args: | | |
| RELEASE_VERSION=${{ github.ref_name }} | |
| tags: tmp-agent-image | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:cache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:cache,mode=max | |
| - id: agent-manifest | |
| run: | | |
| set -e | |
| docker run -d --rm --name=tmp-agent -p 8000:8000 -e HOST=0.0.0.0 -e PORT=8000 tmp-agent-image | |
| success=0 | |
| for i in {1..30}; do | |
| echo "Extracting manifest: attempt $i" | |
| response=$(curl http://localhost:8000/.well-known/agent-card.json 2>/dev/null) && success=1 && break | |
| sleep 0.5 | |
| done | |
| [[ "$success" == 1 ]] || (echo "Failed to discover agents" && exit 1) | |
| docker kill tmp-agent | |
| AGENT_MANIFEST=$(echo "$response" | base64 -w 0) | |
| echo "content=$AGENT_MANIFEST" >> $GITHUB_OUTPUT | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: . | |
| file: ./agents/${{ matrix.agent }}/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| RELEASE_VERSION=${{ github.ref_name }} | |
| tags: | | |
| ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:${{ github.sha }} | |
| ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:${{ steps.version.outputs.version }} | |
| ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:${{ steps.version.outputs.latestTag }} | |
| quay.io/beeai/agents/${{ matrix.agent }}:${{ github.sha }} | |
| quay.io/beeai/agents/${{ matrix.agent }}:${{ steps.version.outputs.version }} | |
| quay.io/beeai/agents/${{ matrix.agent }}:${{ steps.version.outputs.latestTag }} | |
| labels: | | |
| beeai.dev.agent.json=${{ steps.agent-manifest.outputs.content }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:cache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/agents/${{ matrix.agent }}:cache,mode=max | |
| vm: | |
| environment: release | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| runs-on: ubuntu-latest | |
| - arch: aarch64 | |
| runs-on: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| install_vm_deps: 'build' | |
| save_cache: 'true' | |
| - id: version | |
| run: | | |
| echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| echo "latestTag=$([[ ${GITHUB_REF#refs/tags/v} =~ [a-zA-Z] ]] && echo prerelease || echo latest)" >> $GITHUB_OUTPUT | |
| - run: mise run microshift-vm:build:qemu --arch ${{ matrix.arch }} | |
| - if: matrix.arch == 'x86_64' | |
| run: mise run microshift-vm:build:wsl | |
| - uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2 | |
| with: | |
| prerelease: ${{ steps.version.outputs.latestTag == 'prerelease' }} | |
| files: | | |
| apps/microshift-vm/dist/${{ matrix.arch }}/microshift-vm-${{ matrix.arch }}.qcow2 | |
| ${{ matrix.arch == 'x86_64' && format('apps/microshift-vm/dist/{0}/microshift-vm-{0}.wsl', matrix.arch) || '' }} | |
| - if: matrix.arch == 'x86_64' | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| registry: quay.io | |
| username: beeai+github | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| - if: matrix.arch == 'x86_64' | |
| run: | | |
| cat ./apps/microshift-vm/dist/x86_64/microshift-vm-x86_64.wsl | docker import \ | |
| --platform linux/amd64 \ | |
| - \ | |
| "quay.io/beeai/microshift-vm:${{ steps.version.outputs.version }}" | |
| docker tag \ | |
| "quay.io/beeai/microshift-vm:${{ steps.version.outputs.version }}" \ | |
| "quay.io/beeai/microshift-vm:${{ steps.version.outputs.latestTag }}" | |
| docker push "quay.io/beeai/microshift-vm:${{ steps.version.outputs.version }}" | |
| docker push "quay.io/beeai/microshift-vm:${{ steps.version.outputs.latestTag }}" | |
| agentstack: | |
| needs: [agents, vm] | |
| runs-on: ubuntu-latest | |
| environment: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HELM_EXPERIMENTAL_OCI: "1" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - id: version | |
| run: | | |
| echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| echo "latestTag=$([[ ${GITHUB_REF#refs/tags/v} =~ [a-zA-Z] ]] && echo prerelease || echo latest)" >> $GITHUB_OUTPUT | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| if [[ "$VERSION" =~ [Rr][Cc] ]]; then | |
| echo "npmTag=rc" >> $GITHUB_OUTPUT | |
| else | |
| echo "npmTag=latest" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: ./.github/actions/setup | |
| with: | |
| install_vm_deps: 'run' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: mise run common:check:version | |
| - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 | |
| - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | |
| with: | |
| registry: quay.io | |
| username: beeai+github | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| - run: mise run 'agentstack-server:build:*' | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: ./apps/agentstack-server | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}/agentstack-server:${{ github.sha }} | |
| ghcr.io/${{ github.repository }}/agentstack-server:${{ steps.version.outputs.version }} | |
| ghcr.io/${{ github.repository }}/agentstack-server:${{ steps.version.outputs.latestTag }} | |
| quay.io/beeai/agentstack-server:${{ github.sha }} | |
| quay.io/beeai/agentstack-server:${{ steps.version.outputs.version }} | |
| quay.io/beeai/agentstack-server:${{ steps.version.outputs.latestTag }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/agentstack-server:cache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/agentstack-server:cache,mode=max | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: ./apps/supergateway | |
| file: ./apps/supergateway/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}/supergateway:${{ github.sha }} | |
| quay.io/beeai/supergateway:${{ github.sha }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/supergateway:cache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/supergateway:cache,mode=max | |
| - run: mise run 'keycloak-theme:build:*' | |
| - id: keycloak-version | |
| run: | | |
| KEYCLOAK_VERSION=$(grep -oP 'FROM quay.io/keycloak/keycloak:\K[0-9.]+' ./apps/keycloak-theme/Dockerfile) | |
| echo "version=$KEYCLOAK_VERSION" >> $GITHUB_OUTPUT | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: ./apps/keycloak-theme | |
| file: ./apps/keycloak-theme/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}/keycloak-themed:${{ github.sha }} | |
| ghcr.io/${{ github.repository }}/keycloak-themed:${{ steps.keycloak-version.outputs.version }} | |
| quay.io/beeai/keycloak-themed:${{ github.sha }} | |
| quay.io/beeai/keycloak-themed:${{ steps.keycloak-version.outputs.version }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/keycloak-themed:cache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/keycloak-themed:cache,mode=max | |
| - run: mise run 'agentstack-ui:build:*' | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | |
| with: | |
| context: . | |
| file: ./apps/agentstack-ui/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}/agentstack-ui:${{ github.sha }} | |
| ghcr.io/${{ github.repository }}/agentstack-ui:${{ steps.version.outputs.version }} | |
| ghcr.io/${{ github.repository }}/agentstack-ui:${{ steps.version.outputs.latestTag }} | |
| quay.io/beeai/agentstack-ui:${{ github.sha }} | |
| quay.io/beeai/agentstack-ui:${{ steps.version.outputs.version }} | |
| quay.io/beeai/agentstack-ui:${{ steps.version.outputs.latestTag }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/agentstack-ui:cache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/agentstack-ui:cache,mode=max | |
| - run: mise run helm:build | |
| - run: echo '${{ secrets.GITHUB_TOKEN }}' | helm registry login --username '${{ github.actor }}' --password-stdin ghcr.io | |
| - run: helm push ./helm/dist/agentstack-*.tgz 'oci://ghcr.io/${{ github.repository }}/chart' | |
| - run: mise run agentstack-sdk-py:build | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: apps/agentstack-sdk-py/dist | |
| - run: mise run agentstack-cli:build | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: apps/agentstack-cli/dist | |
| - working-directory: apps/agentstack-sdk-ts | |
| run: npm publish --tag ${{ steps.version.outputs.npmTag }} | |
| - run: | | |
| git reset --hard HEAD | |
| git fetch origin | |
| git checkout -B install origin/main | |
| git push --force --set-upstream origin install |