fix: github actions #6
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: Build and Push DevNet Docker Image (Multi-Arch 16-Core) | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- arch: amd64 | |
runner: ubuntu-24.04-amd64-16-cores | |
- arch: arm64 | |
runner: ubuntu-24.04-arm64-16-cores | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile.devnet | |
push: true | |
platforms: linux/${{ matrix.arch }} | |
tags: | | |
riftresearch/devnet:${{ matrix.arch }} | |
riftresearch/devnet:${{ github.sha }}-${{ matrix.arch }} | |
# Multi-Arch Manifest Creation | |
manifest: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create and push multi-arch manifest | |
run: | | |
docker manifest create riftresearch/devnet:latest \ | |
--amend riftresearch/devnet:amd64 \ | |
--amend riftresearch/devnet:arm64 | |
docker manifest push riftresearch/devnet:latest | |