Merge pull request #11 from WERIFY-EU/feature_get_credentials #36
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: 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 |