Skip to content

Prevent manifest CI failing when no changes are required to the manifest #3

Prevent manifest CI failing when no changes are required to the manifest

Prevent manifest CI failing when no changes are required to the manifest #3

Workflow file for this run

name: Update Manifest
on:
push:
branches:
- main
jobs:
update-manifest:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Update manifest
run: python manifest.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add manifest.json
if git diff --quiet; then
echo "No changes to the manifest."
exit 0
fi
git commit -m 'Update manifest file after merge to main'
git push
env:
# Provide a GitHub token to allow pushing changes
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}