build aptos mainnet release 1.16.3 (#8) #18
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: Docker | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
APTOS_GIT_REVISION: aptos-node-v1.16.3 | |
concurrency: docker | |
jobs: | |
build_push: | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: X64 | |
platform: linux/amd64 | |
- runner: ARM64 | |
platform: linux/arm64 | |
runs-on: | |
- self-hosted | |
- ${{ matrix.runner }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Log into the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Bake aptos-node | |
uses: docker/[email protected] | |
with: | |
targets: aptos-node | |
push: ${{ github.event_name == 'push' }} | |
load: ${{ github.event_name != 'push' }} | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
- name: Bake aptos | |
uses: docker/[email protected] | |
with: | |
targets: aptos | |
push: ${{ github.event_name == 'push' }} | |
load: ${{ github.event_name != 'push' }} | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
manifest: | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [aptos-node, aptos] | |
needs: build_push | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log into the Container registry | |
uses: docker/[email protected] | |
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.APTOS_GIT_REVISION }} \ | |
ghcr.io/shinamicorp/${{ matrix.target }}:${{ env.APTOS_GIT_REVISION }}-linux-amd64 \ | |
ghcr.io/shinamicorp/${{ matrix.target }}:${{ env.APTOS_GIT_REVISION }}-linux-arm64 \ |