Skip to content

Merge pull request #18 from WERIFY-EU/feature_add_token #43

Merge pull request #18 from WERIFY-EU/feature_add_token

Merge pull request #18 from WERIFY-EU/feature_add_token #43

Workflow file for this run

name: Build
env:
IMAGE_TAG_CLIENT: ghcr.io/werify-eu/werify_client/werify_client
IMAGE_VERSION: ${{ github.ref == 'refs/heads/main' && 'latest' || 'staging' }}
on:
push:
branches:
- main
- develop
jobs:
build_werify_client:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'
- name: Docker Buildx Install
uses: docker/setup-buildx-action@v3
- name: Yarn install app
run: yarn install
- name: Yarn build app
run: yarn run build
- name: Docker build image
uses: docker/build-push-action@v5
with:
context: .
target: production
push: true
tags: ${{env.IMAGE_TAG_CLIENT}}:${{env.IMAGE_VERSION}}
cache-from: type=gha
cache-to: type=gha,mode=max