forked from jonasmerlin/rollenspiel-nordwest-bot
Add GitHub Actions workflow for code check and TypeScript build
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: Check and Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:20
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build TypeScript
|
||||
run: npm run build
|
||||
|
||||
build_image:
|
||||
runs-on: docker
|
||||
needs: check
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t rollenspiel-nordwest-bot:${{ gitea.sha }} -t rollenspiel-nordwest-bot:latest .
|
||||
Reference in New Issue
Block a user