forked from aptos-labs/aptos-indexer-processors
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (62 loc) · 1.96 KB
/
push-processor.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
---
jobs:
build-push:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- id: 'metadata'
uses: 'docker/metadata-action@v5'
with:
images: 'econialabs/emojicoin-dot-fun-indexer-processor'
tags: |
type=match,pattern=emojicoin-processor-v(.*),group=1
- id: 'arm64-metadata'
uses: 'docker/metadata-action@v5'
with:
flavor: |
suffix=-arm64,onlatest=true
images: 'econialabs/emojicoin-dot-fun-indexer-processor'
tags: |
type=match,pattern=emojicoin-processor-v(.*),group=1
- uses: 'docker/setup-qemu-action@v3'
- uses: 'docker/setup-buildx-action@v3'
- uses: 'docker/login-action@v3'
with:
password: '${{ secrets.DOCKERHUB_TOKEN }}'
username: '${{ secrets.DOCKERHUB_USERNAME }}'
- name: 'Push AMD image to Docker Hub'
uses: 'docker/build-push-action@v6'
with:
cache-from: 'type=gha'
cache-to: 'type=gha,mode=max'
context: 'rust'
file: 'rust/Dockerfile'
platforms: 'linux/amd64'
push: 'true'
tags: '${{ steps.metadata.outputs.tags }}'
- name: 'Clear Docker cache to free up space for ARM build'
run: 'docker system prune -af'
- name: 'Push ARM image to Docker Hub'
uses: 'docker/build-push-action@v6'
with:
cache-from: 'type=gha'
cache-to: 'type=gha,mode=max'
context: 'rust'
file: 'rust/Dockerfile'
platforms: 'linux/arm64'
push: 'true'
tags: '${{ steps.arm64-metadata.outputs.tags }}'
- name: 'Append ARM images to AMD manifest'
run: |
echo "${{ steps.metadata.outputs.tags }}" | while read -r tag; do
if [ ! -z "$tag" ]; then
docker buildx imagetools create --append -t "$tag" "${tag}-arm64"
fi
done
timeout-minutes: 360
name: 'Push multi-platform processor image to Docker Hub'
'on':
push:
tags:
- 'emojicoin-processor-v*'
...