ci: add new workflow to check if versioned_docs has been modified #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
strategy: | |
matrix: | |
go-version: [1.21.x, 1.22.x] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{matrix.go-version}} | |
- uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.55.2 | |
lint-jsonschema: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- uses: actions/checkout@v4 | |
- name: install check-jsonschema | |
run: python -m pip install 'check-jsonschema==0.27.3' | |
- name: check-jsonschema (metaschema) | |
run: check-jsonschema --check-metaschema website/static/schema.json | |
check_doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get changed files in the docs folder | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: website/versioned_docs/** # Alternatively using: `docs/**` | |
- name: Run step if any file(s) in the docs folder change | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-files-specific.outputs.all_changed_files }} | |
run: | | |
echo "One or more files in the docs folder has changed." | |
echo "List all the files that have changed: $ALL_CHANGED_FILES" |