Bump gradle/actions from aa23778d2dc6f6556fcc7164e99babbd8c3134e4 to 4504a95ca57b383b150e5f64cece035031420365 #6085
Workflow file for this run
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: format code | |
| on: | |
| pull_request: | |
| jobs: | |
| format-code: | |
| name: Format Code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Make format | |
| run: make format | |
| # actions/checkout fetches only a single commit in a detached HEAD state. Therefore | |
| # we need to pass the current branch, otherwise we can't commit the changes. | |
| # GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs. | |
| - name: Commit Formatted Code | |
| run: ./scripts/commit-formatted-code.sh $GITHUB_HEAD_REF |