-
Notifications
You must be signed in to change notification settings - Fork 21
59 lines (52 loc) · 1.93 KB
/
bridge-ui-publish.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
name: Bridge UI Build and Publish
on:
pull_request:
branches:
- main
paths:
- 'bridge-ui/**'
push:
branches:
- main
paths:
- 'bridge-ui/**'
jobs:
publish:
runs-on: [self-hosted, ubuntu-22.04, X64, small]
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get version from package.json
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: ./bridge-ui
- name: Set Docker Tag
id: docker-tag
run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-bridge-ui-${{ steps.package-version.outputs.current-version }}" | tee $GITHUB_ENV
- name: Login to Docker Repository
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Image Build and Publish
id: docker-build-publish
uses: docker/build-push-action@v6
with:
context: .
file: ./bridge-ui/Dockerfile
push: true
tags: consensys/linea-bridge-ui:${{ env.DOCKER_TAG }}
# Env file dedicated for dev
build-args: |
ENV_FILE=./bridge-ui/.env.production
NEXT_PUBLIC_WALLET_CONNECT_ID=${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
NEXT_PUBLIC_INFURA_ID=${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}
cache-from: type=registry,ref=consensys/linea-bridge-ui:buildcache
cache-to: type=registry,ref=consensys/linea-bridge-ui:buildcache,mode=max
env:
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_ID }}
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}