Skip to content

Update README with Plugins List #35

Update README with Plugins List

Update README with Plugins List #35

Workflow file for this run

name: Update README After Badge Changes
on:
workflow_dispatch: # Manual trigger only for now
jobs:
check-and-update-readme:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch badges.json from gh-pages branch
run: |
git fetch origin gh-pages
git show origin/gh-pages:badges.json > badges.json
echo "::notice::Fetched badges.json from gh-pages branch."
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Parse badges.json and update README
id: update-readme
run: |
npm install
node update-readme.js badges.json
continue-on-error: true # Allow job to continue even if no changes are found
outputs:
changes-found: ${{ steps.update-readme.outcome == 'success' }}
create-pr:
runs-on: ubuntu-22.04
needs: check-and-update-readme
if: needs.check-and-update-readme.outputs['changes-found'] == 'true'
steps:
- name: Create branch and commit changes
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
BRANCH_NAME="update-readme-${{ github.run_id }}"
git checkout -b $BRANCH_NAME
git add README.md
git commit -m "Update README with latest download URLs"
git push origin HEAD
echo "::notice::Changes committed and branch pushed."
- name: Create issue content file
run: |
echo "A new branch has been created: **${{ env.BRANCH_NAME }}**." > issue-content.md
echo "" >> issue-content.md
echo "Please review the changes and open a pull request from this branch." >> issue-content.md
echo "" >> issue-content.md
echo "**Compare Changes:** [View on GitHub](https://github.com/${{ github.repository }}/compare/gh-pages...${{ env.BRANCH_NAME }})" >> issue-content.md
- name: Create an issue notification
uses: peter-evans/create-issue-from-file@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "PR Needed: Update README"
content-filepath: issue-content.md
labels: "automated notification"