Network mode #353
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build allin one image | |
on: | |
push: | |
branches: "**" | |
pull_request: | |
branches: "**" | |
env: | |
PG_DB: postgres | |
PG_USER: postgres | |
PG_HOST: localhost | |
PG_PASS: thisisapassword | |
jobs: | |
build_logbook: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
- name: build web | |
run: | | |
yarn install | |
yarn build | |
working-directory: web | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "7.0.x" | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: api | |
- name: run unit tests | |
run: | | |
dotnet restore | |
dotnet test | |
working-directory: api/tests | |
- name: Build logbook image | |
run: | | |
docker build . --file Dockerfile -t ghcr.io/swuecho/logbook:${GITHUB_SHA} | |
docker tag ghcr.io/swuecho/logbook:${GITHUB_SHA} echowuhao/logbook:latest | |
working-directory: api | |
- name: docker compose | |
run: docker compose up -d | |
- name: show docker ps | |
run: docker compose ps | |
- name: show docker logs | |
run: docker compose logs |