Skip to content

Merge pull request #7153 from julianthome/patch-1 #1116

Merge pull request #7153 from julianthome/patch-1

Merge pull request #7153 from julianthome/patch-1 #1116

name: update-queries-docs
on:
workflow_dispatch:
push:
branches: [master]
paths:
- "assets/queries/**/metadata.json"
- "assets/queries/**/test/**"
- ".github/scripts/docs-generator/**"
jobs:
update-docs:
name: Update queries documentation
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Update docs
run: |
pip3 install -r .github/scripts/docs-generator/requirements.txt
python3 -u -B .github/scripts/docs-generator/docs-generator.py \
-p ./assets/queries/ \
-o ./docs/queries/ \
-f md \
-t .github/scripts/docs-generator/templates
python3 -u -B .github/scripts/docs-generator/query-page-generator/query-page-generator.py \
-p ./assets/queries/ \
-o ./docs/queries/ \
-f md \
--t .github/scripts/docs-generator/query-page-generator/templates/query-page-template.md \
--df
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
with:
title: "docs(queries): update queries catalog"
token: ${{ secrets.KICS_BOT_PAT }}
commit-message: "docs(queries): update queries catalog"
delete-branch: true
branch: feature/kicsbot-update-queries-docs
body: |
**Automated Changes**
Updating queries' documentation.
Triggered by SHA: _${{ github.sha }}_
labels: documentation