-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (71 loc) · 2.06 KB
/
docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Docker
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
APTOS_GIT_REVISION: aptos-node-v1.10.0
concurrency: docker
jobs:
build_push:
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:
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 \