summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-06-29 16:37:41 +0200
committerGitHub <noreply@github.com>2023-06-29 10:37:41 -0400
commitfdf71460f99e67d4054dd642af94384c6fc52cc0 (patch)
tree218604bb890378b2e09e61b6edd313437a8a1ff1 /.github
parent64f2d70262c4cfc1ee74875b4ec920551e304199 (diff)
downloadgitea-fdf71460f99e67d4054dd642af94384c6fc52cc0.tar.gz
gitea-fdf71460f99e67d4054dd642af94384c6fc52cc0.zip
Fix `lint-swagger` action (#25593)
- Add detection for swagger changes and run `lint-swagger` on it - Remove `lint-swagger` from `lint-frontend` - Remove `lint-md` from `lint-frontend`
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/files-changed.yml6
-rw-r--r--.github/workflows/pull-compliance.yml12
2 files changed, 18 insertions, 0 deletions
diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml
index 0d43e191a3..658d3a9bea 100644
--- a/.github/workflows/files-changed.yml
+++ b/.github/workflows/files-changed.yml
@@ -15,6 +15,8 @@ on:
value: ${{ jobs.detect.outputs.templates }}
docker:
value: ${{ jobs.detect.outputs.docker }}
+ swagger:
+ value: ${{ jobs.detect.outputs.swagger }}
jobs:
detect:
@@ -27,6 +29,7 @@ jobs:
actions: ${{ steps.changes.outputs.actions }}
templates: ${{ steps.changes.outputs.templates }}
docker: ${{ steps.changes.outputs.docker }}
+ swagger: ${{ steps.changes.outputs.swagger }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
@@ -63,3 +66,6 @@ jobs:
- "Dockerfile.rootless"
- "docker/**"
- "Makefile"
+
+ swagger:
+ - "templates/swagger/v1_json.tmpl"
diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml
index 71e4fe02dc..c8bef283a9 100644
--- a/.github/workflows/pull-compliance.yml
+++ b/.github/workflows/pull-compliance.yml
@@ -39,6 +39,18 @@ jobs:
- run: make deps-py
- run: make lint-templates
+ lint-swagger:
+ if: needs.files-changed.outputs.swagger == 'true'
+ needs: files-changed
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 20
+ - run: make deps-frontend
+ - run: make lint-swagger
+
lint-go-windows:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed