Skip to content

Jadoo: support time-specific leave and button-only leave resolution #28

Jadoo: support time-specific leave and button-only leave resolution

Jadoo: support time-specific leave and button-only leave resolution #28

Workflow file for this run

name: Jadoo – Build, Test & Deploy
on:
push:
branches: [main]
paths:
- "jadoo/**"
- ".github/workflows/jadoo-deploy.yml"
pull_request:
paths:
- "jadoo/**"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/jadoo
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
working-directory: jadoo
run: bun install --frozen-lockfile
- name: Lint & format check
working-directory: jadoo
run: bunx biome check .
- name: Run tests
working-directory: jadoo
run: bun test test/*.test.ts
build-and-push:
needs: test
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: jadoo
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max