lastfmweekly #1255
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: lastfmweekly | |
on: | |
schedule: | |
- cron: '2 0 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: repo checkout | |
uses: actions/checkout@v2 | |
- name: python setup | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: python packages installation | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r dependencies.txt | |
- name: use lastfm api | |
env: | |
LASTFM_API_KEY: ${{ secrets.LASTFM_API_KEY }} | |
LASTFM_USER: ${{ secrets.LASTFM_USER }} | |
IMAGE_COUNT: 10 | |
run: python lastfm.py | |
- name: commit changes | |
continue-on-error: true | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Updated last.fm's weekly chart" -a | |
- name: push changes | |
continue-on-error: true | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }}\ | |
branch: main |