Skip to content

Merge branch 'main' of https://github.com/TomWhitwell/Workshop_Computer #151

Merge branch 'main' of https://github.com/TomWhitwell/Workshop_Computer

Merge branch 'main' of https://github.com/TomWhitwell/Workshop_Computer #151

Workflow file for this run

name: Update README
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml
- name: Update README
run: python .github/scripts/update-readme.py
- name: Check for changes in README.md
id: check_changes
run: |
if git diff --exit-code releases/README.md; then
echo "No changes in README.md"
echo "::set-output name=changed::false"
else
echo "README.md has changed"
echo "::set-output name=changed::true"
fi
- name: Commit changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add releases/README.md
git commit -m 'Update README with folder information'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}