armbian-build/.github/workflows/pr-announce.yml
Werner da899b2c93
attempt to fix pr announce for all contributors (#7081)
The earlier attempt seem to limit announces to repository members for some reason.
This attempt limits to the repo only, therefore forks should not be affected.
Not sure if it works, but there is only one way to find out.
2024-08-13 17:41:10 +02:00

22 lines
938 B
YAML

on:
pull_request:
types: [ opened ]
branches: [ main ]
jobs:
build:
name: "Announce PR on Discord"
runs-on: ubuntu-latest
if: github.repository == 'armbian/build'
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/pull/${{github.event.pull_request.number}}>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}