Update mirror #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bridge UI Build and Publish | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'bridge-ui/**' | |
push: | |
branches: | |
- main | |
paths: | |
- 'bridge-ui/**' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
defaults: | |
run: | |
working-directory: ./bridge-ui | |
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@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- # Setting up Docker Buildx with docker-container driver is required | |
# at the moment to be able to use a subdirectory with Git context | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker Image Build and Publish | |
id: docker-build-publish | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./bridge-ui | |
push: true | |
tags: consensys/linea-bridge-ui:${{ env.DOCKER_TAG }} | |
# Env file dedicated for dev | |
build-args: | | |
ENV_FILE=.env.production | |
NEXT_PUBLIC_WALLET_CONNECT_ID=${{ secrets.PUBLIC_WALLET_CONNECT_ID }} | |
NEXT_PUBLIC_INFURA_ID=${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }} | |
env: | |
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_ID }} | |
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }} |