Skip to content

Fix db init error on first install #8

Fix db init error on first install

Fix db init error on first install #8

Workflow file for this run

name: Docker Build and Publish
on:
push:
branches:
- dev
pull_request:
branches:
- master
release:
types: [published]
jobs:
build_and_publish:
name: Build and Publish Docker Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate metadata for backend image
id: meta-backend
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/geopaysages_backend
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Build and push backend Docker image
id: build-backend
uses: docker/build-push-action@v4
with:
context: ./backend
file: ./backend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.labels }}
- name: Generate metadata for admin image
id: meta-admin
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/geopaysages_admin
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Build and push admin Docker image
id: build-admin
uses: docker/build-push-action@v4
with:
context: ./admin
file: ./admin/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-admin.outputs.tags }}
labels: ${{ steps.meta-admin.outputs.labels }}
- name: Generate metadata for db image
id: meta-db
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/geopaysages_db
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Build and push db Docker image
id: build-db
uses: docker/build-push-action@v4
with:
context: ./db
file: ./db/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-db.outputs.tags }}
labels: ${{ steps.meta-db.outputs.labels }}