From 29613963104d2a27e5d7d774a7a4750b19ba30b1 Mon Sep 17 00:00:00 2001 From: Val Packett Date: Wed, 2 Apr 2025 18:30:17 -0300 Subject: [PATCH] Switch to Forgejo Actions --- .forgejo/workflows/check.yaml | 22 ++++++++++++++++++ .forgejo/workflows/upload.yaml | 22 ++++++++++++++++++ .woodpecker.yml | 41 ---------------------------------- 3 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 .forgejo/workflows/check.yaml create mode 100644 .forgejo/workflows/upload.yaml delete mode 100644 .woodpecker.yml diff --git a/.forgejo/workflows/check.yaml b/.forgejo/workflows/check.yaml new file mode 100644 index 0000000..7cf9883 --- /dev/null +++ b/.forgejo/workflows/check.yaml @@ -0,0 +1,22 @@ +--- +on: + push: + branches: [trunk] + pull_request: + types: [opened, synchronize, reopened] +jobs: + test: + runs-on: val-arm64 + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Get Deno + run: curl -fsSL https://deno.land/install.sh | sh + - name: Run server tests + run: /root/.deno/bin/deno test server + - name: Try hash-admin-password + run: echo uwu | /root/.deno/bin/deno run server/hash-admin-password.ts + - name: Check client build + run: /root/.deno/bin/deno run --allow-env --allow-read --allow-write=output npm:tiddlywiki@5.3.5 --build + - name: Check formatting + run: /root/.deno/bin/deno fmt --check --ignore="**/*.css" plugins server diff --git a/.forgejo/workflows/upload.yaml b/.forgejo/workflows/upload.yaml new file mode 100644 index 0000000..680fcbb --- /dev/null +++ b/.forgejo/workflows/upload.yaml @@ -0,0 +1,22 @@ +--- +on: + push: + branches: [release] +jobs: + test: + runs-on: val-arm64 + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Fetch theme + run: mkdir notebook && curl -L https://github.com/valpackett/Notebook/archive/e2c61ccd6e9db5cfcbc77e54eccc8b5961da5831.tar.gz | tar -xvzf - -C notebook --strip-components=1 + - name: Build client + run: npx tiddlywiki@5.3.5 --build + env: + TIDDLYWIKI_THEME_PATH: notebook/themes + TIDDLYWIKI_PLUGIN_PATH: notebook/plugins + - name: Upload result + run: sh bunny.sh + env: + BUNNY_BUCKET: ${{ secrets.BUNNY_BUCKET }} + BUNNY_KEY: ${{ secrets.BUNNY_KEY }} diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index f2e9a98..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,41 +0,0 @@ -when: - - event: push - -steps: - - name: test - image: denoland/deno:alpine - pull: true - commands: - - deno test server - - echo uwu | deno run server/hash-admin-password.ts - - name: fmt - image: denoland/deno:alpine - commands: - - deno fmt --check --ignore="**/*.css" plugins server - - name: fetch_theme - image: alpine/curl - when: - - event: push - branch: release - commands: - - mkdir notebook - - curl -L https://github.com/valpackett/Notebook/archive/e2c61ccd6e9db5cfcbc77e54eccc8b5961da5831.tar.gz | tar -xvzf - -C notebook --strip-components=1 - - name: build - image: denoland/deno:alpine - environment: - TIDDLYWIKI_THEME_PATH: notebook/themes - TIDDLYWIKI_PLUGIN_PATH: notebook/plugins - commands: - - deno run --allow-env --allow-read --allow-write=output npm:tiddlywiki@5.3.5 --build - - name: push - image: alpine/curl - when: - - event: push - branch: release - environment: - BUNNY_BUCKET: - from_secret: BUNNY_BUCKET - BUNNY_KEY: - from_secret: BUNNY_KEY - commands: - - sh bunny.sh