Skip to content

Build mainnet-v1.38.3 #590

Build mainnet-v1.38.3

Build mainnet-v1.38.3 #590

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
SUI_GIT_REF: mainnet-v1.38.3
concurrency: docker
jobs:
prep:
runs-on: ubuntu-latest
outputs:
sui_git_sha: ${{ steps.checkout.outputs.commit }}
steps:
- name: Checkout sui
id: checkout
uses: actions/checkout@v4
with:
repository: MystenLabs/sui
ref: ${{ env.SUI_GIT_REF }}
build_push:
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- runner: X64
platform: linux/amd64
- runner: ARM64
platform: linux/arm64
needs: prep
env:
SUI_GIT_REF: ${{ needs.prep.outputs.sui_git_sha }}
PLATFORM: ${{ matrix.platform }}
runs-on:
- self-hosted
- ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Bake and populate builder-base and runtime-base cache
if: github.event_name == 'push'
uses: docker/bake-action@v5
with:
targets: cache-builder-base,cache-runtime-base
- name: Bake and populate binaries cache
uses: docker/bake-action@v5
with:
targets: cache-binaries
- name: Bake images
uses: docker/bake-action@v5
with:
targets: sui-node,sui
push: ${{ github.event_name == 'push' }}
manifest:
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
target: [sui-node, sui]
needs: [prep, build_push]
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest
run: |
docker buildx imagetools create -t ghcr.io/shinamicorp/${{ matrix.target }}:${{ env.SUI_GIT_REF }} \
ghcr.io/shinamicorp/${{ matrix.target }}:${{ needs.prep.outputs.sui_git_sha }}-linux-amd64 \
ghcr.io/shinamicorp/${{ matrix.target }}:${{ needs.prep.outputs.sui_git_sha }}-linux-arm64 \