Skip to content

Mirror from Upstream #179

Mirror from Upstream

Mirror from Upstream #179

name: Mirror from Upstream
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch: # Allow manual trigger
jobs:
mirror-from-upstream:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Set up Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Fastforward from upstream
run: |
git remote add upstream https://github.com/drieslab/Giotto.git
git fetch upstream
git checkout suite
- name: Check for new commits
id: check_commits
run: |
if git merge-base --is-ancestor HEAD upstream/suite; then
echo "No new commits to merge."
echo "has_new_commits=false" >> $GITHUB_OUTPUT
else
echo "New commits to merge."
echo "has_new_commits=true" >> $GITHUB_OUTPUT
fi
- name: Merge and push changes
if: steps.check_commits.outputs.has_new_commits == 'true'
run: |
git merge --ff-only upstream/suite
git push origin suite