-
Notifications
You must be signed in to change notification settings - Fork 16
69 lines (59 loc) · 1.86 KB
/
docker-release.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
name: Build and publish scroll-alpine image
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: Clone, Build, Publish
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: true
- name: Update submodules recursively
run: git submodule update --init --recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '21'
- name: Install dependencies
run: npm install
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build deploy image
id: build_deploy_image
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: scrolltech/scroll-stack-contracts
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
context: .
file: docker/Dockerfile.deploy
tags: |
${{ env.REPOSITORY }}:deploy-${{ github.ref_name }}
${{ env.REPOSITORY }}:latest
- name: Build gen image
id: build_gen_image
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: scrolltech/scroll-stack-contracts
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
context: .
file: docker/Dockerfile.gen-configs
tags: |
${{ env.REPOSITORY }}:gen-configs-${{ github.ref_name }}
${{ env.REPOSITORY }}:latest