mirror of https://github.com/lukechilds/damus.git
Browse Source
Sends pull request notifications to Nostr using Github Workflows and noscl. Closes: #297translations_damus-localizations-en-us-xcloc-localized-contents-en-us-xliff--master_es_419
bndw
2 years ago
committed by
William Casarin
1 changed files with 33 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||||
|
name: Nostr PR Notifier |
||||
|
on: |
||||
|
pull_request: |
||||
|
types: [opened, reopened] |
||||
|
jobs: |
||||
|
Notify: |
||||
|
runs-on: ubuntu-latest |
||||
|
env: |
||||
|
# Set in Github repo > Settings > Secrets and Variables |
||||
|
NOSTR_KEY: ${{ secrets.NOSTR_KEY }} |
||||
|
# Event vars |
||||
|
PR_URL: ${{ github.event.pull_request.html_url }} |
||||
|
PR_TITLE: ${{ github.event.pull_request.title }} |
||||
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }} |
||||
|
PR_BODY: ${{ github.event.pull_request.body }} |
||||
|
steps: |
||||
|
- name: Setup Go |
||||
|
uses: actions/setup-go@v2 |
||||
|
with: |
||||
|
go-version: '1.19.0' |
||||
|
- run: go install github.com/fiatjaf/noscl@latest |
||||
|
- run: which noscl |
||||
|
- run: noscl setprivate $NOSTR_KEY |
||||
|
- run: noscl relay add wss://relay.damus.io |
||||
|
- run: noscl relay add wss://brb.io |
||||
|
- run: noscl relay add wss://relay.nostr.info |
||||
|
- run: noscl relay add wss://nostr.zebedee.cloud |
||||
|
- run: noscl relay add wss://nostr.orangepill.dev |
||||
|
- run: noscl relay add wss://nostr.v0l.io |
||||
|
- run: noscl relay add wss://nostr.fmt.wiz.biz |
||||
|
- run: | |
||||
|
msg=$(printf "Pull request opened by $PR_AUTHOR\n$PR_TITLE\n$PR_URL") \ |
||||
|
&& noscl publish "$msg" |
Loading…
Reference in new issue