Skip to content

Auto Merge Fork

Auto Merge Fork #13

name: Auto Merge Fork
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: confGit
name: Configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- id: addUpstream
name: Add upstream remote
run: git remote add upstream https://github.com/searxng/searxng.git
- id: fetchUpstream
name: Fetch upstream changes
run: git fetch upstream
- id: mergeUpstream
name: Merge upstream changes
# If the merging fails, we check if there is ONLY a conflict in the static css, and preceed if so
run: git merge upstream/master || ( ! git status | grep "both modified" | grep -q -v "searx/static/themes/simple/css" && make themes && ! grep -r "<<<<<<< HEAD" searx/static/themes/simple/css/ && git add searx/static/themes/simple/css/ && git commit -m "Compiled static" )
- id: pushChanges
name: Push changes
if: success()
run: git push origin master