Update GitHub Actions workflow for Python setup
This commit is contained in:
12
.github/workflows/on-file-change.yml
vendored
12
.github/workflows/on-file-change.yml
vendored
@@ -5,24 +5,19 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'py/pytudes.py'
|
- 'py/pytudes.py'
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-update:
|
build-and-update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Added permissions to allow the bot to write to the repo
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v7
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Run pytudes.py
|
- name: Run pytudes.py
|
||||||
run: python py/pytudes.py
|
run: python py/pytudes.py
|
||||||
@@ -32,6 +27,5 @@ jobs:
|
|||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
git add README.md
|
git add README.md
|
||||||
# The || exit 0 prevents the workflow from failing if there are no changes
|
|
||||||
git commit -m "docs: auto-update README.md via pytudes.py" || exit 0
|
git commit -m "docs: auto-update README.md via pytudes.py" || exit 0
|
||||||
git push
|
git push
|
||||||
|
|||||||
Reference in New Issue
Block a user