Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/update-downstream-repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- main
workflow_dispatch:
inputs:
force:
description: 'Pass --force to git subrepo pull'
type: boolean
required: false
default: false

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -106,7 +112,7 @@ jobs:
git switch -c "$branch"
fi

git subrepo pull "$VENDORED_PATH"
git subrepo pull "$VENDORED_PATH" ${{ inputs.force && '--force' || '' }}

# Check for changes to determine if we need to create/update PRs
changes=$(git rev-list --count "$parent".."$branch")
Expand All @@ -124,6 +130,8 @@ jobs:
Subrepo changes may break workflows and require manual updates to
fix errors. It is safe to add manual updates directly to this PR
since they will not be overwritten by future automatic updates.

${{ inputs.force && 'Subrepo updates were made with the `--force` flag so it overwrites any local changes in the subrepo.' || '' }}
run: |
if [[ "$changes" == "1" ]]; then
git push origin HEAD
Expand Down
Loading