Skip to content

Commit

Permalink
workflows: add stamp file in openshift/os to ensure we push rebases
Browse files Browse the repository at this point in the history
The create-pull-request action currently only force-pushes branches if
their diff has changed.  However, if we've meanwhile landed a parallel
fedora-coreos-config update PR via a different branch, the diff might
be the same but the base commit will be different.  We need to push the
branch in this case too, or else the PR will be left unmergeable due to
conflicts.  As a workaround, write the base commit ID into a stamp file
in the root of openshift/os, so the diff will change whenever the base
does.
  • Loading branch information
bgilbert committed Jun 9, 2022
1 parent c51aa47 commit 2dfcd0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/openshift-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ jobs:
echo "No non-trivial changes; exiting"
exit 0
fi
base=$(git rev-parse HEAD)
git checkout testing-devel
# Hack: update a stamp to force create-pull-request to update the
# branch, even if we're just rebasing on a previous manual
# fedora-coreos-config sync
# https://github.com/peter-evans/create-pull-request/issues/1191
echo $base > ../.fedora-coreos-config-base
marker=OPENSHIFT-OS-END-OF-LOG-MARKER-$RANDOM$RANDOM$RANDOM
cat >> $GITHUB_ENV <<EOF
Expand Down

0 comments on commit 2dfcd0f

Please sign in to comment.