Run kape2orc script daily #54
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: Run kape2orc script daily | |
on: | |
schedule: | |
- cron: '0 0 * * *' # This sets the action to run daily at midnight UTC | |
workflow_dispatch: # This allows the workflow to be manually triggered | |
jobs: | |
kape2orc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # Specify the version of Python needed | |
- name: Install required libraries | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Execute kape2orc.py with update option | |
run: | | |
python kape2orc.py --update --source kape --target orc | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Update KAPE files and convert to ORC XML" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |