[Bronze II] Title: 소수 찾기, Time: 8 ms, Memory: 69104 KB -BaekjoonHub #41
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: Increment Progress Badge | |
| on: | |
| push: | |
| branches: ["main"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| bump-badge: | |
| # 봇이 만든 커밋으로 다시 자기 자신이 돌지 않도록 방지 | |
| if: github.actor != 'github-actions[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: true | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Run increment script | |
| run: | | |
| node -v | |
| node .github/scripts/increment-progress.js | |
| - name: Commit & Push if changed | |
| run: | | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git commit -m "chore: bump progress badge by +1" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |