Skip to content

Daily code tip sync #385

Daily code tip sync

Daily code tip sync #385

Workflow file for this run

name: Daily code tip sync
on:
schedule:
# CET so 17.45 Spain time, have tips synced before logging off :)
- cron: "45 16 * * *"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Get source
uses: actions/checkout@v2
- name: Get Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Sync tips to CodeImag.es API
run: |
# defaults to user + pw from env variables below
python sync_tips.py
env:
CODEIMAGES_USER: ${{ secrets.CODEIMAGES_USER }}
CODEIMAGES_PASSWORD: ${{ secrets.CODEIMAGES_PASSWORD }}