Cache image #91
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: Cache image | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
cache-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Config | |
run: | | |
git config --global user.email "kj1ktk@gmail.com" | |
git config --global user.name "Takuma Kajikawa" | |
- name: Download image from Vercel | |
run: | | |
curl -o ./images/github-readme-stats/api.svg 'https://github-readme-stats-git-master-valbeat.vercel.app/api?username=valbeat&show_icons=true&hide_title=true&hide_border=true&line_height=24&show=reviews&theme=gotham' | |
curl -o ./images/github-readme-stats/top-langs.svg 'https://github-readme-stats.vercel.app/api/top-langs/?username=valbeat&hide_title=true&theme=gotham&layout=compact&hide_border=true&langs_count=10&hide=html,css,objective-c&size_weight=0.45&count_weight=0.55' | |
curl -o ./images/holopin/badges.png 'https://holopin.me/valbeat' | |
- name: Commit and push if there's a change | |
run: | | |
git add ./images | |
git commit -m "Update cached image" || exit 0 | |
git push |