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`
This commit is contained in:
parent
64f2d70262
commit
fdf71460f9
6
.github/workflows/files-changed.yml
vendored
6
.github/workflows/files-changed.yml
vendored
|
@ -15,6 +15,8 @@ on:
|
||||||
value: ${{ jobs.detect.outputs.templates }}
|
value: ${{ jobs.detect.outputs.templates }}
|
||||||
docker:
|
docker:
|
||||||
value: ${{ jobs.detect.outputs.docker }}
|
value: ${{ jobs.detect.outputs.docker }}
|
||||||
|
swagger:
|
||||||
|
value: ${{ jobs.detect.outputs.swagger }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect:
|
detect:
|
||||||
|
@ -27,6 +29,7 @@ jobs:
|
||||||
actions: ${{ steps.changes.outputs.actions }}
|
actions: ${{ steps.changes.outputs.actions }}
|
||||||
templates: ${{ steps.changes.outputs.templates }}
|
templates: ${{ steps.changes.outputs.templates }}
|
||||||
docker: ${{ steps.changes.outputs.docker }}
|
docker: ${{ steps.changes.outputs.docker }}
|
||||||
|
swagger: ${{ steps.changes.outputs.swagger }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
|
@ -63,3 +66,6 @@ jobs:
|
||||||
- "Dockerfile.rootless"
|
- "Dockerfile.rootless"
|
||||||
- "docker/**"
|
- "docker/**"
|
||||||
- "Makefile"
|
- "Makefile"
|
||||||
|
|
||||||
|
swagger:
|
||||||
|
- "templates/swagger/v1_json.tmpl"
|
||||||
|
|
12
.github/workflows/pull-compliance.yml
vendored
12
.github/workflows/pull-compliance.yml
vendored
|
@ -39,6 +39,18 @@ jobs:
|
||||||
- run: make deps-py
|
- run: make deps-py
|
||||||
- run: make lint-templates
|
- 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:
|
lint-go-windows:
|
||||||
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
||||||
needs: files-changed
|
needs: files-changed
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -360,10 +360,10 @@ lint: lint-frontend lint-backend
|
||||||
lint-fix: lint-frontend-fix lint-backend-fix
|
lint-fix: lint-frontend-fix lint-backend-fix
|
||||||
|
|
||||||
.PHONY: lint-frontend
|
.PHONY: lint-frontend
|
||||||
lint-frontend: lint-js lint-css lint-md lint-swagger
|
lint-frontend: lint-js lint-css
|
||||||
|
|
||||||
.PHONY: lint-frontend-fix
|
.PHONY: lint-frontend-fix
|
||||||
lint-frontend-fix: lint-js-fix lint-css-fix lint-md lint-swagger
|
lint-frontend-fix: lint-js-fix lint-css-fix
|
||||||
|
|
||||||
.PHONY: lint-backend
|
.PHONY: lint-backend
|
||||||
lint-backend: lint-go lint-go-vet lint-editorconfig
|
lint-backend: lint-go lint-go-vet lint-editorconfig
|
||||||
|
|
Loading…
Reference in a new issue