Run CLI (Automated) #1
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: Run CLI (Automated) | |
on: | |
schedule: | |
- cron: "40 2 15 * *" # “At 02:40 on day-of-month 15.” | |
jobs: | |
run_cli: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repo | |
uses: actions/checkout@v3 | |
- name: 🐍🛠️ setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
# File can be encoded to base64 on https://base64.guru/converter/encode/file | |
- name: 🔑🔓 Decoding Firebase Admin SDK Credentials | |
run: echo "${{ secrets.ADMIN_SDK_FIREBASE_CREDS }}" | base64 --decode > adminsdk-creds.json | |
- name: 📦💻 install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: 🏃♀️🐍💻 execute py script | |
run: python main.py fetch --relative-month 1 | |
- name: 📤📦 Upload file(s) to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: outputs | |
- name: 📝 Record input(s) | |
run: | | |
echo "## Run on CRON" >> $GITHUB_STEP_SUMMARY |