-
-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Check new upstream commits | ||
|
||
on: | ||
repository_dispatch: | ||
types: [check_upstream] | ||
|
||
jobs: | ||
sync_with_upstream: | ||
runs-on: ubuntu-latest | ||
name: Sync master with upstream latest | ||
|
||
steps: | ||
- name: Checkout master | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: next | ||
|
||
- name: Fetch upstream changes | ||
id: sync | ||
uses: ivanmilov/upstream_check_new_commits@v1 | ||
with: | ||
upstream_repository: yshui/picom | ||
upstream_branch: next | ||
target_branch: next_upstream | ||
|
||
- name: Check for new commits | ||
if: ${{ steps.sync.outputs.has_new_commits == 'true' }} | ||
run: curl -s -X POST --connect-timeout 10 https://api.telegram.org/bot${{secrets.API_KEY}}/sendMessage -d chat_id=${{secrets.CHAT_ID}} -d parse_mode="Markdown" -d text="New commit in upstream repo ${{github.repository}}" | ||
|
||
- name: Notify if new commits | ||
uses: ivanmilov/telegram_notify_action@v1 | ||
with: | ||
api_key: ${{secrets.API_KEY}} | ||
chat_id: ${{secrets.CHAT_ID}} | ||
message: "New commit in upstream repo ${{github.repository}}" | ||
if: ${{ steps.sync.outputs.has_new_commits == 'true' }} |