Merge branch 'main' of https://github.com/TomWhitwell/Workshop_Computer #151
This file contains hidden or 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: 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 }} |