Skip to content

Commit fdf7146

Browse files
authored
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`
1 parent 64f2d70 commit fdf7146

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/files-changed.yml

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
value: ${{ jobs.detect.outputs.templates }}
1616
docker:
1717
value: ${{ jobs.detect.outputs.docker }}
18+
swagger:
19+
value: ${{ jobs.detect.outputs.swagger }}
1820

1921
jobs:
2022
detect:
@@ -27,6 +29,7 @@ jobs:
2729
actions: ${{ steps.changes.outputs.actions }}
2830
templates: ${{ steps.changes.outputs.templates }}
2931
docker: ${{ steps.changes.outputs.docker }}
32+
swagger: ${{ steps.changes.outputs.swagger }}
3033
steps:
3134
- uses: actions/checkout@v3
3235
- uses: dorny/paths-filter@v2
@@ -63,3 +66,6 @@ jobs:
6366
- "Dockerfile.rootless"
6467
- "docker/**"
6568
- "Makefile"
69+
70+
swagger:
71+
- "templates/swagger/v1_json.tmpl"

.github/workflows/pull-compliance.yml

+12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ jobs:
3939
- run: make deps-py
4040
- run: make lint-templates
4141

42+
lint-swagger:
43+
if: needs.files-changed.outputs.swagger == 'true'
44+
needs: files-changed
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: actions/setup-node@v3
49+
with:
50+
node-version: 20
51+
- run: make deps-frontend
52+
- run: make lint-swagger
53+
4254
lint-go-windows:
4355
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
4456
needs: files-changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ lint: lint-frontend lint-backend
360360
lint-fix: lint-frontend-fix lint-backend-fix
361361

362362
.PHONY: lint-frontend
363-
lint-frontend: lint-js lint-css lint-md lint-swagger
363+
lint-frontend: lint-js lint-css
364364

365365
.PHONY: lint-frontend-fix
366-
lint-frontend-fix: lint-js-fix lint-css-fix lint-md lint-swagger
366+
lint-frontend-fix: lint-js-fix lint-css-fix
367367

368368
.PHONY: lint-backend
369369
lint-backend: lint-go lint-go-vet lint-editorconfig

0 commit comments

Comments
 (0)