Latest blog post workflow #1096
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: Latest blog post workflow | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
update-blog-post: | |
name: Update this repo's README with latest blog posts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: gautamkrishnar/blog-post-workflow@master | |
name: "Hatena blog" | |
with: | |
max_post_count: "4" | |
feed_list: "https://korosuke613.hatenablog.com/feed" | |
comment_tag_name: HATENA-POST-LIST | |
- uses: gautamkrishnar/blog-post-workflow@master | |
name: "Zenn" | |
with: | |
max_post_count: "4" | |
feed_list: "https://zenn.dev/korosuke613/feed" | |
comment_tag_name: ZENN-POST-LIST | |
# update-most-used-languages: | |
# name: Update most used languages for me | |
# runs-on: ubuntu-latest | |
# needs: [ update-blog-post ] | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: actions/setup-go@v2 | |
# with: | |
# go-version: '1.16' | |
# - uses: actions/cache@v2 | |
# with: | |
# path: | | |
# ~/.cache/go-build | |
# ~/go/pkg/mod | |
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
# restore-keys: | | |
# ${{ runner.os }}-go- | |
# - name: install octlango | |
# run: | | |
# go install github.com/korosuke613/octlango@latest | |
# octlango -v | |
# - name: exec octlango | |
# env: | |
# OCTLANGO_GH_TOKEN: ${{ secrets.OCTLANGO_GH_TOKEN }} | |
# run: | | |
# octlango -u korosuke613 -f markdown | head -12 > replace.txt | |
# cat replace.txt | |
# - uses: denoland/setup-deno@v1 | |
# with: | |
# deno-version: v1.x | |
# - name: replace generated most used languages | |
# run: deno run --allow-read --allow-write update-used-languages.ts | |
# - name: commit changes | |
# run: | | |
# git status --porcelain | |
# [[ -z $(git status --porcelain) ]] && exit 0; true | |
# export NOW_DATE_TIME=$(date '+%Y-%m-%dT%H:%M:%S%z') | |
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
# git config --local user.name "github-actions[bot]" | |
# git add README.md | |
# git commit -m "Updated most used languages ($NOW_DATE_TIME)" | |
# git pull | |
# git push origin main |