mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
2af9b29472
* testing new congrats bot if you see this, it did not work yet * try including multiline message line 2 line 3
24 lines
893 B
YAML
24 lines
893 B
YAML
name: "Discord:congratsbot"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
congrats:
|
|
name: "discord:congratsbot"
|
|
if: github.repository == 'snowpackjs/astro'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- id: setup
|
|
run: |
|
|
TRIMMED=$(echo "${{ github.event.commits[0].message }}" | sed '1!d;q')
|
|
echo "::set-output name=COMMIT_MSG::${TRIMMED}"
|
|
- name: Send a Discord notification when a PR is merged
|
|
env:
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}
|
|
# DISCORD_AVATAR: ${{ github.event.pull_request.user.avatar_url }}
|
|
uses: Ilshidur/action-discord@0.3.2
|
|
with:
|
|
args: '**Sweet!** <${{ github.event.commits[0].author.name }}> just merged ["\"${{ steps.setup.outputs.COMMIT_MSG }}\""](<https://github.com/snowpackjs/astro/commits/main>) ```${{ github.event.commits[0].message }}```'
|