Update README #14
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: | |
| schedule: | |
| - cron: '0 0 * * *' # Run daily at midnight UTC | |
| workflow_dispatch: | |
| inputs: | |
| organization: | |
| description: 'GitHub organization name' | |
| required: false | |
| default: 'openkrab' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| env: | |
| ORG: ${{ github.event.inputs.organization || 'openkrab' }} | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull latest changes | |
| run: git pull origin main | |
| - name: Update Projects section | |
| run: bash .github/scripts/update-projects.sh | |
| - 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 profile/README.md | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "Auto-update Projects section with latest repositories" | |
| git pull --rebase origin main | |
| git push | |
| fi |