nyuusu #59066
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: nyuusu | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '8,34 * * * *' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: curl | |
run: |- | |
curl https://www3.nhk.or.jp/news/json16/accessranking.json | jq -r '.channel.item | map([.title, .link, .pubDate] | join("\t")) | join("\n")' > nyuusu.tsv | |
- name: push | |
run: |- | |
git config user.name "nyuusu" | |
git config user.email "[email protected]" | |
git add -A | |
timestamp=$(TZ="Japan" date --iso-8601=m) | |
git commit -m "commit at ${timestamp}" || exit 0 | |
git push |