Skip to content

tweak formatting

tweak formatting #79

Workflow file for this run

name: Build & Publish Docker Image
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
push:
branches: [ "master" ]
jobs:
build-frontend:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=long
type=match,pattern=main
type=raw,value=latest,enable={{is_default_branch}}
flavor: |
latest=auto
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
REACT_APP_ADMIN_USER_ID=${{ secrets.REACT_APP_ADMIN_USER_ID }}
REACT_APP_FIREBASE_API_KEY=${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN=${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID=${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_STORAGE_BUCKET=${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID=${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_BACKEND_API_URL=${{ secrets.REACT_APP_BACKEND_API_URL }}
build-backend:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract backend metadata for Docker
id: meta-backend
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend
tags: |
type=sha,format=long
type=match,pattern=main
type=raw,value=latest,enable={{is_default_branch}}
flavor: |
latest=auto
- name: Build and push backend
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ${{ steps['meta-backend'].outputs.tags }}
labels: ${{ steps['meta-backend'].outputs.labels }}