-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (41 loc) · 1.33 KB
/
l1-devnet-release.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
name: Build and publish l1-devnet image
on:
push:
tags:
- 'l1-devnet-*'
jobs:
build:
name: Clone, Build, Publish
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- 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: Extract tag version
id: extract_tag
run: |
# Extract the tag version part from the ref name
VERSION=$(echo "${GITHUB_REF##*/}" | sed 's/^l1-devnet-//')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Build image
id: build
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: l1-devnet
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
context: .
file: custom-images/l1-devnet/Dockerfile
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.VERSION }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:latest