Skip to content

Commit

Permalink
workflows/openshift-os : fixing up the initial checkout
Browse files Browse the repository at this point in the history
the base branch should be checked out initally otherwise the rebase will
fails.
Also fixup the log generation to remove the hard-coded testing-devel
  • Loading branch information
jbtrystram committed Feb 27, 2024
1 parent a2bc379 commit 60db0a4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/openshift-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
# We need an unbroken commit chain when pushing to the fork. Don't
# make assumptions about which commits are already available there.
fetch-depth: 0
# We need to checkout against the target branch
ref: ${{ github.event.inputs.target-branch }}

- name: Update submodule
env:
Expand All @@ -58,7 +60,7 @@ jobs:
cd fedora-coreos-config
# Omit CoreOS Bot commits from the log message, since they generally
# only affect FCOS
git shortlog "HEAD..testing-devel" --perl-regexp \
git shortlog "HEAD..origin/$SOURCE_BRANCH" --perl-regexp \
--author='^((?!CoreOS Bot <[email protected]>).*)$' \
> $RUNNER_TEMP/shortlog
Expand All @@ -67,7 +69,7 @@ jobs:
echo "No non-trivial changes; exiting"
exit 0
fi
git checkout $SOURCE_BRANCH
marker=OPENSHIFT-OS-END-OF-LOG-MARKER-$RANDOM$RANDOM$RANDOM
cat >> $GITHUB_ENV <<EOF
Expand All @@ -77,10 +79,10 @@ jobs:
EOF
- name: Open pull request
uses: peter-evans/create-pull-request@v4.2.3
uses: peter-evans/create-pull-request@v6.0.0
with:
token: ${{ secrets.COREOSBOT_RELENG_TOKEN }}
push-to-fork: coreosbot-releng/os
push-to-fork: openshift/os
branch: ${{ env.BRANCH_NAME }}
base: ${{ env.TARGET_BRANCH }}
commit-message: |
Expand Down

0 comments on commit 60db0a4

Please sign in to comment.