Skip to content

Commit

Permalink
Send summaries of PR and merges to main chat (armbian#7060)
Browse files Browse the repository at this point in the history
* Create pr-announce.yml

* Rename pr-announce.yml to pr-announce.yml

* Create merge-announce.yml
  • Loading branch information
EvilOlaf authored Aug 11, 2024
1 parent 3ad547f commit 77e6c9c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/merge-announce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: push

on:
push:
branches: [ main ]

jobs:
announcepush:
runs-on: ubuntu-latest
steps:
- name: Get repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Send push to Discord
run: |
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data \
"{\"username\": \"Github\", \"avatar_url\": \"${{ secrets.AVATARURL }}\", \"content\": \"\
:white_check_mark: **Merged** into [$GITHUB_REPOSITORY](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY>) by [$GITHUB_ACTOR](<$GITHUB_SERVER_URL/$GITHUB_ACTOR>) - \
[Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}
18 changes: 18 additions & 0 deletions .github/workflows/pr-announce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Discord webhook
run: |
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data \
"{\"username\": \"Github\", \"avatar_url\": \"${{ secrets.AVATARURL }}\", \"content\": \"\
:arrow_heading_up: **Pull request** to [$GITHUB_REPOSITORY](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY>) by [$GITHUB_ACTOR](<$GITHUB_SERVER_URL/$GITHUB_ACTOR>) - **Please review!** \
:point_right: [Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}

0 comments on commit 77e6c9c

Please sign in to comment.