Run CLI #31
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
cli_args: | |
description: "Commands" | |
default: fetch | |
required: true | |
jobs: | |
run_cli: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ππ οΈ setup python | |
uses: actions/setup-python@v5 | |
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 ${{ inputs.cli_args }} | |
- name: π€π¦ Upload file(s) to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: outputs | |
- name: π Record input(s) | |
run: | | |
echo "## Input given:" >> $GITHUB_STEP_SUMMARY | |
echo \`${{ inputs.cli_args }}\` >> $GITHUB_STEP_SUMMARY |