Run Project on Schedule #375
This file contains 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: Run Project on Schedule | |
on: | |
schedule: | |
- cron: '30 2 * * *' # It is executed every day at 06:00 Iran time. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2.7.1 | |
with: | |
gradle-version: 7.4.2 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Retryable Gradlew Run | |
uses: nick-fields/retry@v2 | |
with: | |
command: ./gradlew run --args=${{secrets.TOKEN}} | |
timeout_minutes: 3 | |
max_attempts: 3 |