GitHub ci #9
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: "Spotless Code Formatting" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
spotless: | |
runs-on: [ self-hosted, Linux ] | |
container: tmio/besu-build:1.0 | |
timeout-minutes: 30 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- name: export runner UID | |
run: echo "runner_uid=$UID" >> $GITHUB_ENV | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: adopt | |
java-version: 17 | |
cache: gradle | |
- name: spotless | |
run: ./gradlew --no-daemon --parallel clean spotlessCheck | |
- name: Correct Ownership in GITHUB_WORKSPACE directory | |
uses: peter-murray/reset-workspace-ownership-action@v1 | |
with: | |
user_id: ${{ env.runner_uid }} |