Skip to content

feat:skip switching themes and check welcome screen (#1131) #608

feat:skip switching themes and check welcome screen (#1131)

feat:skip switching themes and check welcome screen (#1131) #608

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- testnet
- develop
- staging
- main
env:
REGISTRY: 403372804574.dkr.ecr.us-east-2.amazonaws.com/lifi-docker-repo
IMAGE_NAME: 'lifinance/jumper-exchange'
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set current date as env variable
run: echo "UNIQ_ID=$(date +'%y%m%d')-${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: |
/tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::403372804574:role/github-actions
role-session-name: github-actions-role-session
aws-region: us-east-2
- name: Amazon ECR login
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=branch,prefix=${{ env.UNIQ_ID }}-
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=local,src=/tmp/.buildx-cache
cache-to: |
type=local,dest=/tmp/.buildx-cache
build-args: |
ENV_FILE=${{ env.BRANCH_NAME == 'main' && '.env.production' || env.BRANCH_NAME == 'develop' && '.env.development' || format('.env.{0}', env.BRANCH_NAME) }}
ENV_NAME=${{ env.BRANCH_NAME == 'main' && 'prod' || env.BRANCH_NAME }}