-
Notifications
You must be signed in to change notification settings - Fork 0
Add workflow to regenerate derived files #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,104 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Regenerate derived files | ||||||||||||||||||||||||||||||||||||||||||||||||||
| on: # yamllint disable-line rule:truthy | ||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - "src/valuesets/schema/**/*.yaml" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - "src/valuesets/schema/*.yaml" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: {} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| regen: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout | ||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install uv | ||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: astral-sh/setup-uv@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| enable-cache: true | ||||||||||||||||||||||||||||||||||||||||||||||||||
| cache-dependency-glob: "uv.lock" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| cache-dependency-glob: "uv.lock" | |
| cache-dependency-glob: "uv.lock" | |
| python-version: "3.13" |
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action versions should be pinned to specific versions for reproducibility and security. The repository uses pinned versions consistently in other workflows (e.g., actions/checkout@v4.2.2, astral-sh/setup-uv@v6.4.3, actions/setup-python@v5.6.0). Update these action references to match the versions used in main.yaml and deploy-docs.yaml.
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6.4.3 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5.6.0 |
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow uses 'uv sync --group dev' while other workflows in this repository use 'uv sync --dev'. Since the pyproject.toml defines dev dependencies using dependency-groups, '--group dev' is technically correct. However, for consistency with existing workflows (main.yaml:52, deploy-docs.yaml:53), consider using '--dev' instead unless there's a specific reason to use the newer '--group' syntax.
| run: uv sync --group dev --no-progress | |
| run: uv sync --dev --no-progress |
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow doesn't verify that the regeneration commands succeeded before attempting to create a PR. If just gen-project or just gen-doc fails, the workflow will continue and potentially create a PR with incomplete or incorrect changes. Consider adding error handling or checks to ensure the regeneration completed successfully before proceeding to create the PR.
| run: | | |
| run: | | |
| set -euo pipefail |
Copilot
AI
Feb 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR body has inconsistent indentation which may result in incorrectly formatted markdown. The heredoc content (lines 94-102) is indented with leading spaces while the opening 'EOF' delimiter (line 93) has no indentation. This could cause the PR description to have unexpected leading whitespace. Consider aligning the heredoc content to start at column 0 or adjusting the indentation to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow lacks concurrency control, which could lead to race conditions if multiple schema changes are pushed to main in quick succession. Multiple workflow runs could attempt to create PRs simultaneously, or a second run could start while the first is still creating its PR. Add a concurrency group to ensure only one regeneration workflow runs at a time and cancel any in-progress runs when a new one starts.