ci: use head_ref for rebase if available; else ref
@@ -26,15 +26,16 @@ jobs:
if: github.repository != env.EE_REPO
uses: actions/checkout@v3
with:
- fetch-depth: 1 # we only need the main branch
+ #fetch-depth: 1 # we only need the default branch
+ fetch-depth: 0 #
token: ${{ secrets.DETERMINED_TOKEN }}
repository: ${{ env.EE_REPO }}
- name: add OSS repository remote and get candidate branch
if: github.repository != env.EE_REPO
run: |
# ssh checkout of additional remotes fails :/
- git remote add OSS https://github.com/${{ env.OSS_REPO }}
- git fetch OSS "${{ github.ref }}":proposed_base
+ git remote add -f OSS https://github.com/${{ env.OSS_REPO }}
+ git fetch OSS "${{ github.head_ref || github.ref }}":proposed_base
- name: attempt rebase
if: github.repository != env.EE_REPO
run: |
