Skip to content

Fix: keep target action references on sync - #9

Merged
stonebuzz merged 2 commits into
mainfrom
bump_backport_action_v5
Nov 25, 2026
Merged

stonebuzz merged 2 commits into
mainfrom
bump_backport_action_v5

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Synced files overwrote the action references of target repositories, so Dependabot pull requests opened there conflicted with the sync pull request or were reverted by it. The sync now keeps the references already set in each target file, letting the target Dependabot manage them on every branch. References set here only apply to targets missing the action; this repository's Dependabot now scans sync/files and sync/files-public to keep them up to date. Also bumps korthout/backport-action to v5.0.0 in the forward-port workflow.

@Rom1-B
Rom1-B requested a review from stonebuzz November 18, 2026 12:11
Comment thread .github/dependabot.yml Outdated
Comment on lines +5 to +8
directories:
- "/"
- "/sync/files"
- "/sync/files-public"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not 100% sure, but it looks like Dependabot may not pick up the workflows in /sync/files and /sync/files-public with the current configuration, worth double checking.

From what I read in dependabot-core, the github-actions file fetcher only looks into .github/workflows when the configured directory is exactly /. For any other directory, it seems to list the YAML files directly inside that directory (workflows_dir = "."), without descending into .github/workflows:
https://github.com/dependabot/dependabot-core/blob/cbabeb7b1671021a093ac3990c9e0ac17dc20fdd/github_actions/lib/dependabot/github_actions/file_fetcher.rb#L162-L182

If that reading is correct, /sync/files and /sync/files-public only contain a .github folder at their root, so Dependabot would find no workflow there, and the pinned references in the synced files would never be updated (which the README now states they are).

If confirmed, pointing the entries at the workflow folders themselves should work:

    directories:
      - "/"
      - "/sync/files/.github/workflows"
      - "/sync/files-public/.github/workflows"

Comment thread .github/scripts/sync.sh Outdated
match($0, /uses: "[^"@]+@/) {
action = substr($0, RSTART, RLENGTH)
if (FNR == NR) { pins[action] = substr($0, RSTART + RLENGTH); next }
if (action in pins) { $0 = substr($0, 1, RSTART + RLENGTH - 1) pins[action] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

a reference already present in a target always wins, even when the template is bumped on purpose, worth double checking.

If so, the backport-action v5.0.0 bump of this PR would not reach the targets that already have forward-port.yml: they would stay on v4.7.0 until their own Dependabot proposes v5. The same would apply to a future @v1 to @v2 move of the reusable glpi-project/* workflows. And if a later template change needs an input that only exists in the new version, targets would get the new inputs with the old action.

@Rom1-B
Rom1-B requested a review from stonebuzz November 23, 2026 10:37
@stonebuzz
stonebuzz merged commit 3dc04b2 into main Nov 25, 2026
3 checks passed
@stonebuzz
stonebuzz deleted the bump_backport_action_v5 branch November 25, 2026 09:57
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