Release stable2409-1 #37
Workflow file for this run
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
# CI action that can either run: | |
# - via a manual trigger on a PR | |
# - every time a PR is updated | |
# The CI then then either updates the readme with a python script, | |
# or checks that it does not need update. | |
name: Update Files | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
jobs: | |
update-files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- uses: extractions/setup-just@v1 | |
with: | |
just-version: 1.35.0 | |
- name: All files | |
run: just | |
- name: Check for changes | |
id: git-check | |
run: | | |
git diff --exit-code --name-only . || echo "changes=true" >> $GITHUB_OUTPUT | |
- name: Commit and push changes if manually triggered | |
if: github.event_name == 'workflow_dispatch' && steps.git-check.outputs.changes == 'true' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update files" | |
git push origin ${{ github.head_ref }} | |
- name: Error if changes needed on PR | |
if: github.event_name == 'pull_request' && steps.git-check.outputs.changes == 'true' | |
run: | | |
echo "Error: files need to be updated. Please run this workflow manually to update it." | |
exit 1 |