Append songs #107
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: Append songs | |
on: | |
schedule: | |
- cron: '00 8 * * 5' | |
workflow_dispatch: | |
jobs: | |
execute-cron: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Python Environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Requirements | |
run: pip install -r requirements.txt | |
- name: Execute Python script | |
run: python main.py | |
env: | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | |
NEW_MUSIC_FRIDAY_ID: ${{ secrets.NEW_MUSIC_FRIDAY_ID }} | |
SAVE_TO_ID: ${{ secrets.SAVE_TO_ID }} | |
run-if-failed: | |
runs-on: ubuntu-latest | |
needs: [execute-cron] | |
if: always() && (needs.execute-cron.result == 'failure') | |
steps: | |
- name: Sleep Action | |
uses: juliangruber/[email protected] | |
with: | |
time: 10m | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Python Environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Requirements | |
run: pip install -r requirements.txt | |
- name: Execute Python script | |
run: python main.py | |
env: | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | |
NEW_MUSIC_FRIDAY_ID: ${{ secrets.NEW_MUSIC_FRIDAY_ID }} | |
USER_ID: ${{ secrets.USER_ID }} |