avanderw/Ensure Branch is Up-to-Date
Check if a branch is up-to-date with (or ahead of) a target branch
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Jun 4, 2025
- License
- None
Pinned Snippet
uses: avanderw/ensure-branch-up-to-date-action@cedcc932ef0ddf0b63bafbf1e1e1bb48df2bfaf7 # 2025.06.04.14.16-cedcc93tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| current-branch | Branch to check (defaults to current branch if not specified) | no | "" |
| target-branch | Target branch to compare against (e.g., main, master) | yes | — |
| fail-if-behind | Whether to fail the workflow if branch is behind target | no | true |
Outputs
| name | description |
|---|---|
| is-up-to-date | Whether the current branch is up-to-date with the target (true/false) |
| reason | The reason for the result (e.g., branches_identical, behind_target) |
| commits-behind | Number of commits the current branch is behind the target |
| commits-ahead | Number of commits the current branch is ahead of the target |