f0ckv2/.gitea/workflows/build.yaml

44 lines
1.0 KiB
YAML
Raw Permalink Normal View History

2023-04-30 03:23:59 +00:00
name: fetch npm modules
run-name: fetch npm modules
on: [push]
jobs:
2023-04-30 03:48:27 +00:00
f0ck the f0cker:
2023-04-30 03:23:59 +00:00
runs-on: ubuntu-latest
2023-04-30 03:48:27 +00:00
services:
postgres:
image: postgres:15.2
2023-04-30 03:58:02 +00:00
env:
POSTGRES_USER: f0ck
POSTGRES_PASSWORD: f0ck
POSTGRES_DB: f0ck
POSTGRES_PORT: 5432
2023-04-30 03:48:27 +00:00
ports:
- 5432:5432
2023-04-30 03:58:02 +00:00
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
2023-04-30 03:23:59 +00:00
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
- run: npm ci
2023-04-30 03:58:02 +00:00
- name: Install PostgreSQL client
run: |
apt-get update
2023-04-30 03:59:06 +00:00
apt-get install --yes postgresql-client
2023-04-30 11:53:34 +00:00
2023-04-30 03:58:02 +00:00
- name: import f0ck database
run: psql -h postgres -d f0ck -U f0ck < f0ck.sql
2023-04-30 03:48:27 +00:00
env:
2023-04-30 03:58:02 +00:00
PGPASSWORD: f0ck
2023-04-30 11:53:34 +00:00
2023-04-30 03:58:02 +00:00
- name: create directories
run: mkdir -p tmp public/ca deleted/{ca,b,t}
- name: copy config
run: cp config_example.json config.json