Skip to content

Add workflow to build app #3

Add workflow to build app

Add workflow to build app #3

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
CONTAINER_REGISTRY: ghcr.io
steps:
- uses: actions/checkout@v4
- name: Build app
run: |
cd app
yarn install --immutable
yarn tsc
yarn build:backend --config ../../app-config.yaml --config ../../app-config.production.yaml
- name: Get Docker image tag
id: image_tags
run: |
echo "tag=$CONTAINER_REGISTRY/$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]'):$GITHUB_SHA" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build
run: |
cd app && docker build . --tag
docker push $TAG
env:
TAG: ${{ steps.image_tags.outputs.tag }}