diff options
author | silverwind <me@silverwind.io> | 2023-09-08 04:24:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 22:24:06 -0400 |
commit | 3c0c27965836328abd2668dcd77710ee2460535e (patch) | |
tree | 57302ecf1c5619be185d888e91c1bd876cf9942e /.github/workflows | |
parent | f9abb6ade28d49f00f28623d172b5a8ed27f4509 (diff) | |
download | gitea-3c0c27965836328abd2668dcd77710ee2460535e.tar.gz gitea-3c0c27965836328abd2668dcd77710ee2460535e.zip |
Add `yamllint` (#26965)
So that https://github.com/go-gitea/gitea/pull/26964 does not happen
again. Merge this after that PR. Config is based on
[node's](https://github.com/nodejs/node/blob/main/.yamllint.yaml).
---------
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/files-changed.yml | 8 | ||||
-rw-r--r-- | .github/workflows/pull-compliance.yml | 13 | ||||
-rw-r--r-- | .github/workflows/pull-db-tests.yml | 6 |
3 files changed, 24 insertions, 3 deletions
diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml index 24de4076f2..48db7a732e 100644 --- a/.github/workflows/files-changed.yml +++ b/.github/workflows/files-changed.yml @@ -17,6 +17,8 @@ on: value: ${{ jobs.detect.outputs.docker }} swagger: value: ${{ jobs.detect.outputs.swagger }} + yaml: + value: ${{ jobs.detect.outputs.yaml }} jobs: detect: @@ -30,6 +32,7 @@ jobs: templates: ${{ steps.changes.outputs.templates }} docker: ${{ steps.changes.outputs.docker }} swagger: ${{ steps.changes.outputs.swagger }} + yaml: ${{ steps.changes.outputs.yaml }} steps: - uses: actions/checkout@v3 - uses: dorny/paths-filter@v2 @@ -82,3 +85,8 @@ jobs: - "package.json" - "package-lock.json" - ".spectral.yaml" + + yaml: + - "**/*.yml" + - "**/*.yaml" + - ".yamllint.yaml" diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 45dd77fd92..bcbd218846 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -39,6 +39,19 @@ jobs: - run: make deps-py - run: make lint-templates + lint-yaml: + if: needs.files-changed.outputs.yaml == 'true' + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + - run: pip install poetry + - run: make deps-py + - run: make lint-yaml + lint-swagger: if: needs.files-changed.outputs.swagger == 'true' needs: files-changed diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index 50c92a9e9b..bbe589d5c8 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -88,7 +88,7 @@ jobs: mysql: image: mysql:5.7 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: test ports: - "3306:3306" @@ -160,7 +160,7 @@ jobs: mysql: image: mysql:5.7 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: test ports: - "3306:3306" @@ -205,7 +205,7 @@ jobs: mysql8: image: mysql:8 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: testgitea ports: - "3306:3306" |