Notify Community Discord #37
Workflow file for this run
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
name: Notify Community Discord | |
on: | |
release: | |
types: [ released ] | |
jobs: | |
send-notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Manipulate Event | |
uses: actions/github-script@v7 | |
id: set-result | |
with: | |
script: | | |
const fs = require('fs'); | |
const payload = { ...context.payload, action: 'created' }; | |
fs.writeFileSync(process.env.GITHUB_EVENT_PATH, JSON.stringify(payload)); | |
- name: Post Event | |
run: | | |
curl -X POST -H 'Content-Type: application/json' -d @$GITHUB_EVENT_PATH ${{ secrets.DISCORD_NOTIFY_WEBHOOK }} |