Skip to content

Update All

Update All #69629

Workflow file for this run

# This workflow runs the main script, fetches new data from all the available sources (except Instagram) and eventually posts updates on Twitter
name: Update All
on:
schedule:
- cron: "*/10 * * * *" # Runs every 10 minutes, everyday (actual timing may vary, depending on GitHub)
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
concurrency: update_flow # Using a concurrency group to avoid two workflows to run together
steps:
- name: checkout repo content # Checkout the repository content to GitHub runner
uses: actions/checkout@v2
- name: setup python # Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8 # The script actually runs fine with Python 3.8
- name: install pip # Install pip
run: |
python -m pip install --upgrade pip
- name: install requirements # Install external modules
run: |
pip3 install -r requirements.txt
- name: execute py script # Run the script to fetch the latest data
run: |
python main.py -no-instagram -no-radio
env: # API KEYs are passed as environment variables. For more info https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_KEY: ${{ secrets.TWITTER_ACCESS_KEY }}
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}
SPOTIPY_CLIENT_ID: ${{ secrets.SPOTIPY_CLIENT_ID }}
SPOTIPY_CLIENT_SECRET: ${{ secrets.SPOTIPY_CLIENT_SECRET }}
- name: Commit changes # Commit changes to the master branch
run: |
git config --global user.name 'marco97pa'
git config --global user.email 'marco97pa@live.it'
git add .
git commit -m "Updated data.yaml"
git push
continue-on-error: true