forked from base-org/node
-
Notifications
You must be signed in to change notification settings - Fork 9
80 lines (68 loc) · 2.58 KB
/
docker.yml
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
name: Publish Docker Images
on:
push:
branches:
- main
- LISK-1402-Publish-docker-images-to-ECR
env:
DOCKER_BUILD_PLATFORMS: linux/amd64
RETH_FEATURES: jemalloc,asm-keccak,optimism
RETH_BUILD_PROFILE: release
jobs:
docker_prep:
name: Pre-prep for docker image build
runs-on: ubuntu-latest
environment: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker image - Mainnet
id: docker-image-mainnet
run: |
echo "image=${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}" >> $GITHUB_OUTPUT
- name: Docker image - Sepolia
id: docker-image-sepolia
run: |
echo "image=${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY_SEPOLIA }}" >> $GITHUB_OUTPUT
- name: Build and push image for Lisk Mainnet
uses: docker/build-push-action@v6
id: docker-build-mainnet
with:
context: .
file: reth/Dockerfile
build-args: |
FEATURES=${{ env.RETH_FEATURES }}
RETH_BUILD_PROFILE=${{ env.RETH_BUILD_PROFILE }}
platforms: ${{ env.DOCKER_BUILD_PLATFORMS }}
push: true
tags: |
${{ steps.docker-image-mainnet.outputs.image }}:latest
${{ steps.docker-image-mainnet.outputs.image }}:${{ github.sha }}
- name: Apply Lisk Sepolia hotfix
id: apply-sepolia-hotfix
run: git apply ./dockerfile-lisk-sepolia.patch
- name: Build and push image for Lisk Sepolia
uses: docker/build-push-action@v6
id: docker-build-sepolia
with:
context: .
file: reth/Dockerfile
build-args: |
FEATURES=${{ env.RETH_FEATURES }}
RETH_BUILD_PROFILE=${{ env.RETH_BUILD_PROFILE }}
platforms: ${{ env.DOCKER_BUILD_PLATFORMS }}
push: true
tags: |
${{ steps.docker-image-sepolia.outputs.image }}:latest
${{ steps.docker-image-sepolia.outputs.image }}:${{ github.sha }}