damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

pr-to-nostr.yaml (1195B)


      1 name: Nostr PR Notifier
      2 on: 
      3   pull_request:
      4     types: [opened, reopened]
      5 jobs:
      6   Notify:
      7     runs-on: ubuntu-latest
      8     env:
      9       # Set in Github repo > Settings > Secrets and Variables
     10       NOSTR_KEY: ${{ secrets.NOSTR_KEY }}
     11       # Event vars
     12       PR_URL: ${{ github.event.pull_request.html_url }}
     13       PR_TITLE: ${{ github.event.pull_request.title }}
     14       PR_AUTHOR: ${{ github.event.pull_request.user.login }}
     15       PR_BODY: ${{ github.event.pull_request.body }}
     16     steps:
     17       - name: Setup Go
     18         uses: actions/setup-go@v2
     19         with:
     20           go-version: '1.19.0'
     21       - run: go install github.com/fiatjaf/noscl@latest
     22       - run: which noscl
     23       - run: noscl setprivate $NOSTR_KEY
     24       - run: noscl relay add wss://relay.damus.io
     25       - run: noscl relay add wss://brb.io
     26       - run: noscl relay add wss://relay.nostr.info
     27       - run: noscl relay add wss://nostr.zebedee.cloud
     28       - run: noscl relay add wss://nostr.orangepill.dev
     29       - run: noscl relay add wss://nostr.v0l.io
     30       - run: noscl relay add wss://nostr.fmt.wiz.biz
     31       - run: |
     32          msg=$(printf "Pull request opened by $PR_AUTHOR\n$PR_TITLE\n$PR_URL") \
     33          && noscl publish "$msg"