Skip to content

Download and Commit File #264

Download and Commit File

Download and Commit File #264

Workflow file for this run

name: Download and Commit File
on:
schedule:
- cron: "0 0 * * *" # Runs at 00:00 UTC every day
workflow_dispatch:
jobs:
download-and-commit:
runs-on: ubuntu-latest
name: Job to Download Items
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Download Files
uses: ./
env:
DOWNLOAD_ITEMS: ${{ secrets.DOWNLOAD_ITEMS }}
- name: Commit and Push
run: |
git status --porcelain
git_status=$(git status --porcelain)
if [[ -n $git_status ]]; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -f data/*
git commit -m "Update downloaded file"
git push
fi