Skip to content

pull-data

pull-data #378

Workflow file for this run

name: pull-data
on:
workflow_dispatch: {}
schedule:
- cron: '0 12 * * *' # runs at 12:00 UTC everyday
jobs:
build:
permissions:
id-token: write # Enable OIDC
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: install python packages
run: |
python -m pip install --upgrade pipenv
pipenv install
- name: execute py script
env:
DATA_URL: ${{ secrets.DATA_URL }}
run: pipenv run python main.py
- name: gitsign
uses: chainguard-dev/actions/setup-gitsign@main
- name: commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add data.csv
git commit -m "update data"
git push origin main
- if: ${{ failure() && github.event_name == 'schedule' }}
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: pull-data failed.
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}