diff options
| author | JustZvan <justzvan@justzvan.xyz> | 2026-02-06 12:16:40 +0100 |
|---|---|---|
| committer | JustZvan <justzvan@justzvan.xyz> | 2026-02-06 12:16:40 +0100 |
| commit | e904e9634548e47d611bdcbb88d7b180b927fd5f (patch) | |
| tree | 21aa5be08fc5b22585508c0263ee5ea4effcc593 /.github | |
feat: initial commit!
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/on_push.yml | 43 | ||||
| -rw-r--r-- | .github/workflows/pull_request.yml | 33 |
2 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml new file mode 100644 index 0000000..ea7b9f6 --- /dev/null +++ b/.github/workflows/on_push.yml @@ -0,0 +1,43 @@ +name: Build & Push Docker Image to GHCR + +on: + push: + branches: + - main + - master + +permissions: + contents: read + packages: write + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..77aae91 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,33 @@ +name: Pull Request +on: [pull_request, workflow_dispatch] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - uses: pnpm/action-setup@v4 + with: + version: 10.19.0 + + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + + - name: Install dependencies + run: pnpm i + + - name: Run unit tests + run: pnpm test:run + + - name: Check for TypeScript errors + run: pnpm tsc --noEmit + + - name: Check for linter errors + run: pnpm lint + + - name: Check for formatting errors + run: pnpm format:check |