Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Update updatechecker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rtaserver authored Nov 21, 2024
1 parent f297210 commit 17d550a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/updatechecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
uses: actions/checkout@v4

- name: Set up Git
run: |
Expand All @@ -32,8 +30,11 @@ jobs:
- name: Check for updates
id: check_updates
run: |
git merge upstream/main || echo "needs_update=true" >> $GITHUB_OUTPUT
echo "needs_update=false" >> $GITHUB_OUTPUT
if git merge upstream/main; then
echo "needs_update=true" >> $GITHUB_OUTPUT
else
echo "needs_update=false" >> $GITHUB_OUTPUT
fi
- name: Push changes
if: steps.check_updates.outputs.needs_update == 'true'
Expand All @@ -47,7 +48,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
title: 'Sync from upstream'
body: 'This PR syncs the fork with the upstream repository.'
base: main
base: mod
head: main

- name: Notify Telegram
Expand All @@ -63,4 +64,4 @@ jobs:
curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id":"'$TELEGRAM_CHAT_ID'","text":"'"$MESSAGE"'","parse_mode":"Markdown","reply_markup":'"$BUTTON"'}'
-d '{"chat_id":"'$TELEGRAM_CHAT_ID'","text":"'"$MESSAGE"'","parse_mode":"Markdown","reply_markup":'"$BUTTON"'}'

0 comments on commit 17d550a

Please sign in to comment.