Auto Extract #24
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: Auto Extract | |
on: | |
# push: | |
# branches: | |
# - main | |
schedule: | |
- cron: "0 */6 * * *" | |
workflow_dispatch: | |
jobs: | |
Extract: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run extract script | |
run: python main.py | |
- name: Set Date env | |
run: echo "DATE=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | |
- name: Commit & Push changes | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: Auto extract by Github Actions at UTC ${{ env.DATE }} | |
create_branch: true | |
branch: main | |
commit_options: '--allow-empty' | |
push_options: '--force' |