Update Artists #753
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: Update Artists | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- 'src/**' | |
- '.github/workflows/run.yaml' | |
schedule: | |
- cron: "00 1 * * *" | |
permissions: | |
contents: write | |
jobs: | |
update-artists: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run script | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
LASTFM_USERNAME: ${{ vars.LASTFM_USERNAME }} | |
shell: pwsh | |
run: ./src/main.ps1 -LastFmUserName "$env:LASTFM_USERNAME" | Out-File artists.md | |
- name: Push file | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add ./artists.md | |
git commit -am "[Automated changes] Update artists" | |
git push | |
shell: pwsh |