Skip to content

ci: run only this fork's workflows and harden the sync job - #3

Merged
baysl merged 1 commit into
mainfrom
fix/sync-upstream-review
Aug 12, 2026
Merged

baysl merged 1 commit into
mainfrom
fix/sync-upstream-review

Conversation

@baysl

@baysl baysl commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Delete upstream's CI, CodeQL, docker and release workflows (Windows and arm64 builds included). They were only disabled in the repo settings, which is invisible in the code and does not cover new workflow files upstream may add. The sync job now deletes them on every merge, so the fork keeps running just build-image.yaml and sync-upstream.yaml.

Review fixes:

  • pass the sync branch to git push via env instead of a ${{ }} inline expansion, which was a command injection sink (branch name is derived from an upstream tag)
  • replace set +e with set -euo pipefail and scope failure handling to the two commands expected to fail (merge-base --is-ancestor, merge). A failing git fetch no longer produces a green run with an empty PR
  • distinguish merge-base --is-ancestor rc 1 (not an ancestor) from 128 (bad revision), and abort when git merge fails without conflicts
  • open conflicted PRs as drafts

Checklist for Pull Requests


Delete upstream's CI, CodeQL, docker and release workflows (Windows and
arm64 builds included). They were only disabled in the repo settings,
which is invisible in the code and does not cover new workflow files
upstream may add. The sync job now deletes them on every merge, so the
fork keeps running just build-image.yaml and sync-upstream.yaml.

Review fixes:
* pass the sync branch to `git push` via env instead of a `${{ }}` inline
  expansion, which was a command injection sink (branch name is derived
  from an upstream tag)
* replace `set +e` with `set -euo pipefail` and scope failure handling to
  the two commands expected to fail (`merge-base --is-ancestor`, `merge`).
  A failing `git fetch` no longer produces a green run with an empty PR
* distinguish `merge-base --is-ancestor` rc 1 (not an ancestor) from 128
  (bad revision), and abort when `git merge` fails without conflicts
* open conflicted PRs as drafts
@baysl
baysl merged commit 2e94b45 into main Aug 12, 2026
1 check 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.

1 participant