Skip to content

ci: add / update Dockerfile.local #111

ci: add / update Dockerfile.local

ci: add / update Dockerfile.local #111

Workflow file for this run

name: Main
on:
push:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
subdir: [backend, frontend]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install package
run: |
cd ${{ matrix.subdir }}
yarn
- name: Run lint
run: |
cd ${{ matrix.subdir }}
yarn lint-check
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
subdir: [backend, frontend]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install package
run: |
cd ${{ matrix.subdir }}
yarn
- name: Run test
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
cd ${{ matrix.subdir }}
yarn test
build:
needs: [lint, test]
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
subdir: [backend, frontend, nginx]
uses: allyusd/workflows/.github/workflows/docker-publish.yml@main
with:
subdir: ${{ matrix.subdir }}
deploy:
needs: build
runs-on: ubuntu-latest
environment: production
steps:
- name: Webhook
run: |
curl -s -X POST \
--fail \
-F token=${{ secrets.WEBHOOK_TOKEN }} \
-F ref=main \
${{ secrets.WEBHOOK_URL }} \
> /dev/null
# deploy:
# needs: build
# uses: allyusd/workflows/.github/workflows/docker-compose.yml@main
# with:
# namespace: game-as-a-service
# projectName: minesweeper
# secrets:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USERNAME }}
# key: ${{ secrets.SSH_KEY }}