Periodic Update #1167
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: Periodic Update | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
update_images: | |
runs-on: ubuntu-latest | |
env: | |
CI_COMMIT_MESSAGE: Update VIX indicator images | |
CI_COMMIT_AUTHOR: GitHub Actions | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
- name: Set up Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: '3.10' | |
environment-file: environment.yml | |
activate-environment: myenv | |
- name: Install yfinance and requests with pip | |
shell: bash -l {0} | |
run: | | |
pip install yfinance requests | |
- name: Run script | |
shell: bash -l {0} | |
run: | | |
conda info | |
python generate_indicator_raw.py | |
python generate_indicator_smooth.py | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "actions@github.com" | |
git add images/ | |
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | |
git push | |
- name: Add workflow status badge | |
uses: actions/checkout@v2 |