summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yaml15
-rw-r--r--.github/dependabot.yml8
-rw-r--r--.github/workflows/ci.yaml51
-rw-r--r--.github/workflows/format.yaml35
-rw-r--r--.github/workflows/nix.yaml25
-rw-r--r--.github/workflows/update-flake.yaml36
6 files changed, 120 insertions, 50 deletions
diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
deleted file mode 100644
index ae20cd0..0000000
--- a/.github/dependabot.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly"
- commit-message:
- prefix: "deps(actions)"
-
- - package-ecosystem: "npm"
- directory: "/"
- schedule:
- interval: "weekly"
- commit-message:
- prefix: "deps(node)"
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..ba00ea5
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,8 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ commit-message:
+ prefix: "deps(actions)"
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..11c4a50
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,51 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup Deno
+ uses: nekowinston/setup-deno@v1
+
+ - name: Run build
+ run: |
+ deno task build
+
+ format:
+ name: Format
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup Deno
+ uses: nekowinston/setup-deno@v1
+
+ - name: Run format
+ run: |
+ deno fmt --check
+
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup Deno
+ uses: nekowinston/setup-deno@v1
+
+ - name: Run lint
+ run: |
+ deno lint --compact || true
+ deno lint
diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml
deleted file mode 100644
index d4849eb..0000000
--- a/.github/workflows/format.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: format
-
-on:
- push:
- branches: [main]
- workflow_dispatch:
-
-permissions:
- contents: write
-
-jobs:
- format:
- runs-on: ubuntu-latest
-
- steps:
- - name: checkout repository
- uses: actions/checkout@v3
-
- - name: install Nix
- uses: cachix/install-nix-action@v20
-
- - uses: cachix/cachix-action@v12
- with:
- name: getchoo
- authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
-
- - name: format
- run: |
- nix develop --command bash -c "pnpm install && pnpm format"
-
- - name: add and commit
- uses: EndBug/add-and-commit@v9
- with:
- default_author: github_actions
- message: "chore: format with prettier"
diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml
new file mode 100644
index 0000000..193c6a3
--- /dev/null
+++ b/.github/workflows/nix.yaml
@@ -0,0 +1,25 @@
+name: Nix
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+ check:
+ name: Check flake
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v9
+
+ - name: Setup cache
+ uses: DeterminateSystems/magic-nix-cache-action@v2
+
+ - name: Run check
+ run: |
+ nix flake check -L --show-trace
diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml
new file mode 100644
index 0000000..0e6158c
--- /dev/null
+++ b/.github/workflows/update-flake.yaml
@@ -0,0 +1,36 @@
+name: Update flake.lock
+
+on:
+ schedule:
+ # run every saturday
+ - cron: "0 0 * * 6"
+ workflow_dispatch:
+
+jobs:
+ update:
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: write
+ pull-requests: write
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v9
+
+ - name: Update lockfile & make PR
+ uses: DeterminateSystems/update-flake-lock@v20
+ id: update
+ with:
+ commit-msg: "flake: update inputs"
+ pr-title: "flake: update inputs"
+ token: ${{ github.token }}
+
+ - name: Enable auto-merge
+ shell: bash
+ run: gh pr merge --rebase "$PR_ID"
+ env:
+ GH_TOKEN: ${{ github.token }}
+ PR_ID: ${{ steps.update.outputs.pull-request-number }}