Эх сурвалжийг харах

chore: Use woodpecker instead of forgejo actions

Sean Blackburn 1 жил өмнө
parent
commit
a71d07b2fb

+ 3 - 2
.copier-answers.yml

@@ -1,8 +1,8 @@
 # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
-_commit: 1.1.0
+_commit: 1.2.0
 _src_path: ssh://git@git.snas.black-burn.ch:43057/templates/copier-openapi.git
 author: Sean Blackburn
-ci: actions
+ci: woodpecker
 description: OpenAPI documentation of the modulplaner API
 email: sean@black-burn.ch
 has_dockerfile: false
@@ -11,3 +11,4 @@ project_name: Modulplaner OpenAPI
 repo_location: forgejo
 use_renovate: false
 use_semantic_release: true
+vulnerability_scanning: false

+ 0 - 74
.forgejo/workflows/push.yaml

@@ -1,74 +0,0 @@
-name: Push action
-on: [push]
-
-jobs:
-  pre-commit:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-
-      - name: Add pipx to PATH
-        run: echo "/root/.local/bin" >> $GITHUB_PATH
-
-      - name: Setup cache
-        uses: actions/cache@v3
-        with:
-          path: |
-            /opt/hostedtoolcache
-            ~/.local/pipx
-            /root/.local/bin
-          key: ${{ runner.os }}-toolcache
-
-      - name: Install pre-commit
-        run: pipx install pre-commit --force
-
-      - uses: actions/cache@v3
-        with:
-          path: ~/.cache/pre-commit
-          key: pre-commit-3|${{ env.pythonLocation }}|${{ steps.get-hash-pre-commit.outputs.hash }}
-
-      - run: pre-commit run --all-files --show-diff-on-failure --color=always ${{ inputs.extra_args }}
-        shell: bash
-
-  semantic-release:
-    runs-on: ubuntu-latest
-    needs:
-      - pre-commit
-    if: github.ref == 'refs/heads/main'
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v4
-
-      - name: Add pipx to PATH
-        run: echo "/root/.local/bin" >> $GITHUB_PATH
-
-      - uses: actions/setup-node@v4
-        with:
-          node-version: "22.9.0"
-
-      - name: Setup cache
-        uses: actions/cache@v3
-        with:
-          path: |
-            ~/.local/pipx
-            /root/.local/bin
-          key: ${{ runner.os }}-semantic-release-toolcache
-
-      - name: Install poetry
-        run: pipx install poetry --force
-
-      - name: Semantic Release
-        id: release
-        uses: https://github.com/cycjimmy/semantic-release-action@v4
-        with:
-          extra_plugins: |
-            @saithodev/semantic-release-gitea
-            @bjoluc/semantic-release-config-poetry
-            @semantic-release/git
-            @semantic-release/changelog
-            @semantic-release/exec
-            @google/semantic-release-replace-plugin
-            prettier
-        env:
-          GITEA_URL: ${{ github.server_url }}
-          GITEA_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}

+ 0 - 4
.forgejo/workflows/release.yaml

@@ -1,4 +0,0 @@
-name: Release action
-on: [release]
-
-jobs:

+ 2 - 0
.gitignore

@@ -1,3 +1,5 @@
+out/
+
 # General
 .DS_Store
 .AppleDouble

+ 45 - 0
.woodpecker/.push.yml

@@ -0,0 +1,45 @@
+when:
+  event:
+    - push
+    - pull_request
+    - manual
+
+steps:
+  pre-commit:
+    image: python:3.12
+    commands:
+      - python -m pip install pre-commit
+      - export SKIP=redocly-lint
+      - pre-commit run -a
+
+  lint-openapi:
+    image: node:22
+    commands:
+      - npm i -g @redocly/cli@latest
+      - make lint
+
+  semantic-release:
+    image: node:22
+    secrets:
+      - SEMANTIC_RELEASE_TOKEN
+    commands:
+      - |
+        npm i -g @saithodev/semantic-release-gitea \
+          @bjoluc/semantic-release-config-poetry \
+          @semantic-release/git \
+          @semantic-release/changelog \
+          @semantic-release/exec \
+          @google/semantic-release-replace-plugin \
+          prettier;
+      - export GITEA_URL=https://git.snas.black-burn.ch
+      - export GITEA_TOKEN=$${SEMANTIC_RELEASE_TOKEN}
+      - semantic-release
+    when:
+      branch:
+        - "*.*.x"
+        - main
+        - master
+        - next
+        - next-major
+        - beta
+        - alpha

+ 1 - 1
cspell.config.yaml

@@ -8,7 +8,7 @@ ignorePaths:
   - cspell.config.yaml
   - .copier-answers.yml
   - "*.svg"
-  - .forgejo/*
+  - .woodpecker/*
   - .releaserc.yaml
   - CHANGELOG.md
 dictionaryDefinitions: []

+ 0 - 0
src/webhooks/.gitkeep