Skip to content

Workflow file for this run

name: Check for Upstream Updates
on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday at midnight UTC
workflow_dispatch: # Allows manual trigger from the Actions tab
jobs:
check-updates:
runs-on: ubuntu-latest
steps:
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Clone your fork
run: |
git clone https://github.com/AndreHauschild/groops.git
cd groops
git remote add upstream https://github.com/groops-devs/groops.git
git fetch upstream
- name: Check for upstream changes
id: check-updates
run: |
cd groops
UPDATES=$(git log HEAD..upstream/main --oneline)
echo "::set-output name=updates::$UPDATES"
if [ -n "$UPDATES" ]; then
echo "Updates found!"
echo "$UPDATES"
else
echo "No updates found."
fi
- name: Notify about updates
if: success() && steps.check-updates.outputs.updates != ''
run: |
echo "There are new changes in the upstream repository!" | mail -s "Upstream Updates" ${{ secrets.NOTIFY_EMAIL }}
- name: Notify about no updates
if: success() && steps.check-updates.outputs.updates == ''
run: |
..........echo "There are NO new changes in the upstream repository!" | mail -s "Upstream Updates" ${{ secrets.NOTIFY_EMAIL }}

Check failure on line 44 in .github/workflows/check-updates.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check-updates.yml

Invalid workflow file

You have an error in your yaml syntax on line 44