Skip to content

create volume for mongo #21

create volume for mongo

create volume for mongo #21

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' }}
MONGODB_URI: ${{secrets.MONGODB_URI}}
MONGO_INITDB_ROOT_USERNAME: ${{secrets.MONGO_INITDB_ROOT_USERNAME}}
MONGO_INITDB_ROOT_PASSWORD: ${{secrets.MONGO_INITDB_ROOT_PASSWORD}}
MONGO_INITDB_DATABASE: ${{secrets.MONGO_DATABASE}}
on:
push:
branches:
- master
- develop
- github_actions
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
env:
CI: ""
- 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