Skip to content

Use GitHub app credentials for auto-dependabot#508

Merged
llucax merged 6 commits intofrequenz-floss:v0.x.xfrom
llucax:auto-dependabot-app
Feb 18, 2026
Merged

Use GitHub app credentials for auto-dependabot#508
llucax merged 6 commits intofrequenz-floss:v0.x.xfrom
llucax:auto-dependabot-app

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Feb 13, 2026

Actions performed with GITHUB_TOKEN may not trigger follow-up workflow runs, which can prevent merge queue CI (merge_group) from starting and can leave auto-merge “stuck” without merging. Using a GitHub App token avoids this suppression and restores reliable merge-queue processing.

@llucax llucax requested a review from a team as a code owner February 13, 2026 14:38
@llucax llucax requested review from Marenz and removed request for a team February 13, 2026 14:38
@github-actions github-actions bot added the part:template Affects the cookiecutter template files label Feb 13, 2026
@llucax llucax self-assigned this Feb 13, 2026
@llucax llucax added this to the v0.15.0 milestone Feb 13, 2026
@llucax llucax added part:ci Affects the GitHub workflow and other parts for running CI type:bug Something isn't working labels Feb 13, 2026
@llucax llucax enabled auto-merge February 13, 2026 14:39
@llucax
Copy link
Contributor Author

llucax commented Feb 13, 2026

I'm still not a 100% sure this will fix it, but it is worth trying, it seems to be the only thing that could be wrong.

@llucax
Copy link
Contributor Author

llucax commented Feb 16, 2026

Test: #508

This utility function replaces a whole file. We also update the function
`replace_file_contents_atomically()` to use the new function and avoid
duplication.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
To be able to enable auto-merge effectively, we need to use an external
auth token to interact with GitHub, otherwise no events are produced
when using the Action's provided token, and the merge never happens
(either because the auto-merging doesn't trigger, or because the PR is
queued but no CI is run on the queue so it times out).

This job now requires the repo having a APP ID and PRIVATE KEY to
generate a token to do the auto-merging and approving.

To be able to get credentials for the GitHub App, we need to use the
`pull_request_target` event instead of `pull_request`, as the later
won't pass credentials to untrusted actors. This also means some extra
care need to be taken.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>

# This is the commit message frequenz-floss#2:

# fixup! template: Update auto-dependabot workflow to use an app token
We remove the fine-grained update for ubuntu-slim from a previous step
because now we are just replacing the whole file.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@llucax llucax force-pushed the auto-dependabot-app branch from 27406cd to de30890 Compare February 18, 2026 12:52
@llucax
Copy link
Contributor Author

llucax commented Feb 18, 2026

Tests show this seems to work now, so ready for a review.

@llucax llucax added this pull request to the merge queue Feb 18, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit bf3f395 Feb 18, 2026
5 checks passed
@llucax llucax deleted the auto-dependabot-app branch February 18, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:ci Affects the GitHub workflow and other parts for running CI part:template Affects the cookiecutter template files type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants