From 9999ff6a2e1377d50342af01a7b29e9de82abd83 Mon Sep 17 00:00:00 2001 From: Eric Theise Date: Wed, 10 Jul 2024 17:30:02 -0700 Subject: [PATCH] Part of https://github.com/OpenHistoricalMap/issues/issues/786, adjusting workflow. --- .github/workflows/ohm.upstream-sync.yml | 5 +++++ scripts/upstream_sync.sh | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ohm.upstream-sync.yml b/.github/workflows/ohm.upstream-sync.yml index f9a12a25..4ee712af 100644 --- a/.github/workflows/ohm.upstream-sync.yml +++ b/.github/workflows/ohm.upstream-sync.yml @@ -15,10 +15,15 @@ jobs: run: shell: bash steps: + - name: Create sacrificial branch + uses: peterjgrainger/action-create-branch@v3.0.0 + with: + branch: 'the-sacrifice' - name: Check out our repository uses: actions/checkout@v4 with: fetch-depth: 0 + ref: 'the-sacrifice' - name: Check out the upstream repository env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/upstream_sync.sh b/scripts/upstream_sync.sh index 2d80c10d..d5c95a95 100755 --- a/scripts/upstream_sync.sh +++ b/scripts/upstream_sync.sh @@ -3,9 +3,6 @@ # As we enter this script we have created `the-sacrifice` from our `main` branch and # have `git fetch`ed upstream/master. -git branch -D the-sacrifice &>/dev/null -git checkout -b the-sacrifice - if [ ! -d "upstream" ]; then mkdir upstream fi