Update Inled Projects #23
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 Inled Projects | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 2 * * *' # Every day at 02:00 UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update-readme: | |
| if: | | |
| github.event_name == 'schedule' || | |
| github.event_name == 'workflow_dispatch' || | |
| contains(github.event.head_commit.message, '[ACTION]') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Update README with projects | |
| run: node .github/scripts/update-projects.js | |
| - name: Commit and push if changed | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add README.md profile/README.md | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "docs: update inled projects table [skip ci]" | |
| git push | |
| fi |