Trigger workflow on dev #1
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: Prepare contexts | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
jobs: | |
merge-yaml: | |
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.12' | |
- name: Run prepare contexts script | |
run: python scripts/prepare_contexts.py | |
- name: Commit and push changes if any | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add contexts/ | |
git diff --quiet && git diff --staged --quiet || git commit -m "Update contexts" | |
git push |