lolz/.github/workflows/fetch-now.yml

30 lines
706 B
YAML
Raw Normal View History

2024-03-07 02:01:17 +00:00
name: Fetch Now Page
on:
schedule:
- cron: "* */4 * * *"
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
2024-03-07 02:13:31 +00:00
fetch-now-page:
2024-03-07 02:01:17 +00:00
runs-on: ubuntu-latest
2024-03-07 02:13:31 +00:00
permissions:
contents: write
2024-03-07 02:01:17 +00:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Now Page
run: |
curl --location --header "Authorization: Bearer ${{ secrets.OMG_TOKEN }}" \
"https://api.omg.lol/address/${{ secrets.OMG_ADDR }}/now" | \
jq -r .response.now.content > now.md
- name: Commit Now Page
2024-03-07 02:13:31 +00:00
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'fetch /now page'
file_pattern: 'now.md'