Skip to content

Add protocol

Add protocol #1199

Workflow file for this run

name: CI
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
env:
DOCKER_BUILDKIT: "1"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
show-progress: false
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun ci
- run: bun run test
build:
name: Build + Smoke Test
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v6
with:
tags: csz-bot:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Update configuration
if: ${{ github.event_name == 'push' }}
run: |
cp .github/config.json config.json
sed -i 's/<BOT_TOKEN>/${{ secrets.CI_BOT_TOKEN }}/g' config.json
sed -i 's/<CLIENT_ID>/${{ secrets.CI_CLIENT_ID }}/g' config.json
cp .github/aoc.config.json aoc.config.json
- name: Check if bot starts correctly
if: ${{ github.event_name == 'push' }}
run: |
docker run \
--rm \
-e NODE_ENV=development \
-e DATABASE_PATH=:memory: \
-v "$PWD/config.json:/app/config.json" \
-v "$PWD/aoc.config.json:/app/aoc.config.json" \
csz-bot:latest --dry-run