Skip to content

GET UP

GET UP #291

Workflow file for this run

name: GET UP
on:
workflow_dispatch:
inputs:
message:
description: "weather message"
required: false
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
jobs:
sync:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Configure pip cache
uses: actions/cache@v1
id: pip-cache
with:
path: venv
key: pip-1-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
if: steps.pip-cache.outputs.cache-hit != 'true'
- name: GET UP
run: |
source venv/bin/activate
python get_up.py ${{ secrets.G_T }} ${{ github.repository }} "${{ secrets.BING_COOKIE }}" --weather_message ": ${{ github.event.inputs.message }}" --tele_token ${{ secrets.TG_TOKEN }} --tele_chat_id ${{ secrets.TG_CHAT_ID }}
- name: Push New Pic
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "generated today pic" || echo "no need to commit "
git push || echo "no file change"