-
Notifications
You must be signed in to change notification settings - Fork 22
59 lines (56 loc) · 2.06 KB
/
buildx.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
name: Build
on:
workflow_dispatch:
inputs:
geth_version:
description: Geth Version
required: true
jobs:
build:
runs-on: foam-internal
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: "arm,arm64"
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v8"
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/cliquebait:${{ github.event.inputs.geth_version }}
build-args: GETH_VERSION=${{ github.event.inputs.geth_version }}
- name: Load amd64 into docker for local testing
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
load: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/cliquebait:${{ github.event.inputs.geth_version }}
build-args: GETH_VERSION=${{ github.event.inputs.geth_version }}
- name: Ensure it runs
timeout-minutes: 2
run: |
docker run --rm -d -p 8545:8545 -e ACCOUNTS_TO_CREATE=10 ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.inputs.geth_version }}
until curl http://localhost:8545 ; do sleep 1; done
- name: Push image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/cliquebait:${{ github.event.inputs.geth_version }}
build-args: GETH_VERSION=${{ github.event.inputs.geth_version }}