Skip to content

Commit 2d06562

Browse files
ci: add github action triggered manually to generate docker image (#45)
1 parent eedc79a commit 2d06562

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/docker-release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and publish scroll-alpine image
2+
# This workflow aims to build images from the feat-deterministic-deployment branch
3+
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Clone, Build, Publish
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- name: Check out repository
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
18+
- name: Update submodules recursively
19+
run: git submodule update --init --recursive
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v2
23+
24+
- name: Setup Node.js environment
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: '21'
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v2
34+
35+
- name: Login to Dockerhub
36+
uses: docker/login-action@v2
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
41+
- name: Build deploy image
42+
id: build_deploy_image
43+
env:
44+
REPOSITORY: scrolltech/scroll-stack-contracts
45+
uses: docker/build-push-action@v3
46+
with:
47+
platforms: linux/amd64,linux/arm64
48+
push: true
49+
context: .
50+
file: docker/Dockerfile.deploy
51+
tags: |
52+
${{ env.REPOSITORY }}:deploy-${{ github.sha }}
53+
54+
- name: Build gen image
55+
id: build_gen_image
56+
env:
57+
REPOSITORY: scrolltech/scroll-stack-contracts
58+
uses: docker/build-push-action@v3
59+
with:
60+
platforms: linux/amd64,linux/arm64
61+
push: true
62+
context: .
63+
file: docker/Dockerfile.gen-configs
64+
tags: |
65+
${{ env.REPOSITORY }}:gen-configs-${{ github.sha }}

0 commit comments

Comments
 (0)