Skip to content

Split 2 actions#37

Merged
apphp merged 1 commit intomainfrom
add-new-sources
Feb 23, 2026
Merged

Split 2 actions#37
apphp merged 1 commit intomainfrom
add-new-sources

Conversation

@apphp
Copy link
Owner

@apphp apphp commented Feb 23, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Splits the “resources badge update” logic out of the existing link-check workflow into its own dedicated GitHub Actions workflow.

Changes:

  • Removed the badge update step (and related permissions/triggers) from link-check.yml.
  • Added a new badge-update.yml workflow to update and commit badge/resources.json on pushes to main (and manual dispatch).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/link-check.yml Keeps link checking focused on PRs/schedule by removing badge-update responsibilities and related triggers/permissions.
.github/workflows/badge-update.yml New workflow that recalculates and commits the resources badge JSON on main updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- name: Update resources badge
run: |
git fetch origin "$GITHUB_REF_NAME"
git reset --hard "origin/$GITHUB_REF_NAME"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git reset --hard "origin/$GITHUB_REF_NAME" assumes $GITHUB_REF_NAME is a remote branch name. For workflow_dispatch runs started from a tag/commit, origin/<name> may not exist and this will fail. Consider resetting to FETCH_HEAD after the git fetch, or explicitly checking out a branch ref (and/or gating to github.ref_type == 'branch').

Suggested change
git reset --hard "origin/$GITHUB_REF_NAME"
git reset --hard FETCH_HEAD

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +54
git add badge/resources.json
git commit -m "chore: update resources badge"
git push origin "HEAD:$GITHUB_REF_NAME"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow pushes back to the same branch without rebasing/handling races. If main advances while this job runs, git push can fail and the badge won’t update. Consider adding a git pull --rebase (or a retry using --force-with-lease) before pushing, and/or setting concurrency per-branch to avoid overlapping badge-update runs.

Copilot uses AI. Check for mistakes.
@apphp apphp merged commit eb92502 into main Feb 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants