Skip to content

Workflow file for this run

name: Build and run Docker container
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Create PostgreSQL data directory
run: |
sudo mkdir -p /root/mydata/postgresql-data
sudo chown -R 999:999 /root/mydata/postgresql-data
- name: Stop all running Docker containers
run: sudo docker stop $(sudo docker ps -aq) || true
- name: Remove all Docker containers
run: sudo docker rm $(sudo docker ps -aq) || true
- name: Build and start Docker containers
run: sudo docker compose up -d --build