Ping Leetcode API for updates #3272
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: Ping Leetcode API for updates | |
| on: | |
| schedule: | |
| - cron: '*/10 * * * *' | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Java 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Run UpdateManager | |
| run: | | |
| ls -R | |
| javac UpdateManager/*.java | |
| java -cp UpdateManager Main | |
| rm UpdateManager/*.class | |
| working-directory: ./ | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'Leetcode Update Bot' | |
| git config --global user.email 'leetcode-update-bot@users.noreply.github.com' | |
| git add . | |
| git commit -m 'Update progress data' || echo "No changes to commit" | |
| git push origin main |