mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 20:47:34 +00:00
CI: Add script to post mastodon toots for commits on master
This patch adds the toot-commits script (mirroring tweet-commits), posting new commits on the master branch to https://serenityos.social/@commits.
This commit is contained in:
parent
7955cb14fb
commit
143f28b735
2 changed files with 52 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
name: Twitter notifications
|
||||
name: Social media notifications
|
||||
|
||||
on: [ push ]
|
||||
|
||||
|
@ -22,3 +22,20 @@ jobs:
|
|||
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }}
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
|
||||
|
||||
notify_mastodon:
|
||||
runs-on: ubuntu-22.04
|
||||
if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: npm i mastodon
|
||||
- run: |
|
||||
node ${{ github.workspace }}/Meta/toot-commits.js << 'EOF'
|
||||
${{ toJSON(github.event) }}
|
||||
EOF
|
||||
env:
|
||||
ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue