TimescaleDB: Update GUCs list #16
This file contains hidden or 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: "TimescaleDB: Update GUCs list" | |
| # Regenerates the table of TimescaleDB configuration parameters (GUCs) that is | |
| # embedded in the docs via the `src/partials/_timescaledb-gucs.mdx` partial. | |
| # | |
| # How it works: scripts/timescaledb/generate_guc_overview.py fetches `src/guc.c` | |
| # from the timescale/timescaledb repo at the given release tag, parses the | |
| # DefineCustom*Variable macros to extract each GUC's name, type, default, and | |
| # description, and writes them as a Markdown table to the partial. The job then | |
| # opens a pull request with the regenerated partial for a human to review and merge. | |
| # | |
| # Triggers: | |
| # - workflow_call: runs automatically on a TimescaleDB release, invoked by the | |
| # release pipeline with the new release tag. | |
| # - workflow_dispatch: run it by hand to refresh from a specific tag. | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'TimescaleDB release tag to refresh the GUC list from (for example 2.21.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-gucs-list: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Update list of GUCs | |
| run: | | |
| pip install requests=="2.32.3" | |
| python scripts/timescaledb/generate_guc_overview.py "${{ github.event.inputs.tag }}" src/partials/_timescaledb-gucs.mdx | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.ORG_AUTOMATION_TOKEN }} | |
| branch: "timescaledb/generate-gucs-${{ github.event.inputs.tag }}" | |
| add-paths: | | |
| src/partials/_timescaledb-gucs.mdx | |
| delete-branch: true | |
| title: "Updated list of GUCs from TimescaleDB ${{ github.event.inputs.tag }}" |