Merge pull request #1022 from rgantzos/mutual-followers #9
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: Extract Class Names | |
| on: | |
| push: | |
| paths: | |
| - "features/**.js" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| extract: | |
| if: github.repository == 'STForScratch/ScratchTools' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Run extraction script | |
| run: node .github/scripts/extract-classnames.js | |
| - name: Check for changes | |
| id: git-diff | |
| run: | | |
| if git diff --quiet --exit-code class-names.json; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create or Update Pull Request | |
| if: steps.git-diff.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| commit-message: "Update class-names.json" | |
| branch: update-class-names | |
| title: "Update class names" | |
| body: "Automated update of class-names.json" | |
| labels: automated | |
| assignees: rgantzos | |
| delete-branch: true |