From cf4a28bc2665e1c5e32d0162c842fcb070a8403e Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Wed, 6 Mar 2024 20:24:31 -0600 Subject: [PATCH] post /now page on update --- .github/workflows/update-now.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/update-now.yml diff --git a/.github/workflows/update-now.yml b/.github/workflows/update-now.yml new file mode 100644 index 0000000..56826c3 --- /dev/null +++ b/.github/workflows/update-now.yml @@ -0,0 +1,23 @@ +name: Update Now Page +on: + push: + paths: + - 'now.md' + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + update-now-page: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Update Now Page + run: | + request_body='{"listed": "1", "content": '"$(jq -Rsa . now.md)"'}' + curl --location --request POST --header "Authorization: Bearer ${{ secrets.OMG_TOKEN }}" \ + "https://api.omg.lol/address/${{ secrets.OMG_ADDR }}/now" \ + --data "$request_body"