Update build image workflow, split built to avoid emulation #3
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: Build Images on Tag | |
| permissions: | |
| contents: read | |
| packages: write | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.* | |
| jobs: | |
| build-image: | |
| name: Build Docker Image (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: amd64 | |
| runner: ubuntu-24.04 | |
| - platform: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: supleed2 | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and Push Docker Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/${{ matrix.platform }} | |
| push: true | |
| tags: ghcr.io/supleed2/nanobot:${{ github.ref_name }}-${{ matrix.platform }} | |
| merge-manifests: | |
| name: Merge Manifests | |
| runs-on: ubuntu-24.04 | |
| needs: build-image | |
| steps: | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: supleed2 | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Create Multi-Platform Image | |
| run: > | |
| docker buildx imagetools create | |
| -t ghcr.io/supleed2/nanobot:latest | |
| -t ghcr.io/supleed2/nanobot:${{ github.ref_name }} | |
| ghcr.io/supleed2/nanobot:${{ github.ref_name }}-amd64 | |
| ghcr.io/supleed2/nanobot:${{ github.ref_name }}-arm64 |