Skip to content

Commit

Permalink
Part of OpenHistoricalMap/issues#786, adjusting workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
erictheise committed Jul 8, 2024
1 parent cdc190d commit e3dd085
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ohm.upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- name: Check out our repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check out the upstream repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -26,6 +28,8 @@ jobs:
git config --global user.email "[email protected]"
git remote add upstream "${UPSTREAM}"
git fetch upstream master
git branch -D the-sacrifice
git checkout -b the-sacrifice
- name: Make our script executable
run: chmod +x ./scripts/upstream_sync.sh
- name: Run sync script
Expand Down
12 changes: 5 additions & 7 deletions scripts/upstream_sync.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash

# As we enter this script we are on the `main` branch and have `get fetch`ed
# upstream/master.
# As we enter this script we have created `the-sacrifice` from our `main` branch and
# have `git fetch`ed upstream/master.

git checkout main
git branch -D the-sacrifice
git checkout -b the-sacrifice

mkdir upstream
if [ ! -d "upstream" ]; then
mkdir upstream
fi
for i in $(git ls-tree upstream/master --name-only); do
if [[ $i == *.md ]];then
echo $i
Expand Down

0 comments on commit e3dd085

Please sign in to comment.