Codex-generated pull request#42
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8886bc467
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| schedule: | ||
| - cron: "0 4 * * *" |
There was a problem hiding this comment.
Re-enable push trigger for catalog-source changes
This workflow now runs only on daily schedule and workflow_dispatch, so merges to main that update skills/** or catalog-generation inputs no longer publish immediately and can be delayed until the next cron window (or missed if scheduled workflows are paused). That is a regression from the prior push-based automation path and weakens the repository’s automatic-on-main release flow for catalog updates.
Useful? React with 👍 / 👎.
| python-version: "3.12" | ||
|
|
||
| - name: Validate catalog version | ||
| if: steps.changes.outputs.has_new_commits == 'true' |
There was a problem hiding this comment.
Allow manual dispatch to bypass the commit-delta gate
All publishing steps are now gated on steps.changes.outputs.has_new_commits == 'true', which also applies to workflow_dispatch runs. If the latest catalog tag is already on origin/main (for example, rerunning after a failed asset upload or trying to republish with an explicit catalog_version), the workflow exits before versioning and release steps, so manual recovery/backfill is blocked unless a new commit is added.
Useful? React with 👍 / 👎.
| exit 0 | ||
| fi | ||
|
|
||
| commits_since_tag=$(git rev-list --count "${latest_tag}..${main_ref}") |
There was a problem hiding this comment.
Restrict new-commit detection to catalog-relevant changes
The check git rev-list --count "${latest_tag}..${main_ref}" marks any commit on main as requiring a new catalog release, regardless of whether catalog inputs changed. As a result, unrelated commits (for example docs-only updates) will still produce new catalog-v* releases with identical assets, creating unnecessary release churn and version inflation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Updates the catalog publishing GitHub Actions workflow to run on a daily schedule and to skip publishing when there are no new commits since the latest catalog-v* tag.
Changes:
- Replaced the
pushtrigger with a nightlyscheduletrigger (keepingworkflow_dispatch). - Added a preflight step to detect new commits since the latest catalog tag and conditionally skip subsequent steps.
- Added conditional
if:guards to publishing steps based on the preflight result.
You can also share your feedback on Copilot code review. Take the survey.
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v5 | ||
| with: |
| - name: Check for new commits on main since latest catalog release | ||
| id: changes | ||
| shell: bash | ||
| run: | | ||
| git fetch --force --tags origin main | ||
|
|
||
| latest_tag=$(git tag --list "${{ env.CATALOG_TAG_PREFIX }}*" --sort=-v:refname | head -n 1) | ||
| main_ref="origin/main" | ||
|
|
||
| if [[ -z "$latest_tag" ]]; then | ||
| if [[ "$(git rev-list --count "$main_ref")" -gt 0 ]]; then | ||
| echo "has_new_commits=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "has_new_commits=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| echo "latest_tag=" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
|
|
||
| commits_since_tag=$(git rev-list --count "${latest_tag}..${main_ref}") | ||
|
|
||
| if [[ "$commits_since_tag" -gt 0 ]]; then | ||
| echo "has_new_commits=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "has_new_commits=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT" |
| if: steps.changes.outputs.has_new_commits != 'true' | ||
| shell: bash | ||
| run: | | ||
| echo "No new commits on main since latest catalog tag '${{ steps.changes.outputs.latest_tag }}'. Skipping release." | ||
|
|
||
| - name: Set up Python | ||
| if: steps.changes.outputs.has_new_commits == 'true' | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Validate catalog version | ||
| if: steps.changes.outputs.has_new_commits == 'true' |
| @@ -1,13 +1,8 @@ | |||
| name: Publish Catalog Release | |||
|
|
|||
| on: | |||
Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.
Codex Task