Files
hereconnect/.gitea/workflows/deploy-service-db-migrations.yaml
T
ti 7931274680
Deploy app frontend / app frontend (push) Successful in 1m42s
Deploy service couchdb / service couchdb (push) Successful in 31s
Deploy db-migrations / db-migrations (push) Successful in 1m6s
Deploy service message-delivery-method-web-push / service message-delivery-method-web-push (push) Successful in 1m4s
fix local build
2024-12-06 11:15:32 +02:00

47 lines
1.4 KiB
YAML

name: Deploy db-migrations
run-name: ${{ github.actor }} deployed to build branch
on:
push:
branches:
- main
paths:
- 'services/db-migrations/**'
- '.gitea/workflows/deploy-service-db-migrations.yaml'
- 'docker-compose.yml'
- 'package.json'
- 'pnpm-lock.yaml'
jobs:
db-migrations:
runs-on: ubuntu-latest
env:
COUCHDB_USER: ${{secrets.COUCHDB_USER}}
COUCHDB_PASSWORD: ${{secrets.COUCHDB_PASSWORD}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: install dependencies
run: |
corepack enable pnpm && corepack use pnpm@8.15.9
pnpm --filter ./services/db-migrations deploy --prod build/service-db-migrations
- name: build docker image
run: DB_MIGRATIONS_TAG=commit-${{env.GITHUB_SHA}} docker compose -p hereconnect build db-migrations
- name: start container
run: DB_MIGRATIONS_TAG=commit-${{env.GITHUB_SHA}} docker compose -p hereconnect up --pull never db-migrations
- name: rename to latest
run: docker tag hereconnect/service-db-migrations:commit-${{env.GITHUB_SHA}} hereconnect/service-db-migrations:latest
- name: cleanup docker image
if: always()
run: |
docker compose -p hereconnect rm db-migrations --force --stop
docker rmi hereconnect/service-db-migrations:commit-${{env.GITHUB_SHA}}