Skip to content

OHM Upstream Sync

OHM Upstream Sync #33

name: OHM Upstream Sync
on:
schedule:
- cron: "20 5,17 * * *"
workflow_dispatch:
jobs:
upstream-sync:
name: Upstream Sync
permissions:
contents: write
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out our repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Delete previous sacrificial branch
# run: |
# git branch -D 'the-sacrifice'
- name: Create new sacrificial branch
uses: peterjgrainger/[email protected]
with:
branch: 'the-sacrifice'
- name: Check out sacrificial branch
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'the-sacrifice'
- name: Check out upstream master
env:
UPSTREAM: https://github.com/tyrasd/overpass-turbo
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git remote add upstream "${UPSTREAM}"
git fetch upstream master
- name: Make our script executable
run: chmod +x ./scripts/upstream_sync.sh
- name: Run sync script
run: ./scripts/upstream_sync.sh