Auto Fix Lockfile #178
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Auto Fix Lockfile | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "27 3 * * *" | |
| jobs: | |
| auto-fix-lockfile: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ✈ Checkout default branch | |
| if: github.event_name != 'issue_comment' | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: 📦 Setup Node | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: "24" | |
| - name: ☕ Setup Java | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | |
| with: | |
| java-version: "25" | |
| distribution: "corretto" | |
| - name: 🐘 Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| with: | |
| gradle-version: wrapper | |
| cache-read-only: false | |
| - name: 🔧 Make Gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: 🔧 Show Gradle version | |
| run: ./gradlew --version | |
| - name: 🔧 Check build-logic if exist | |
| id: check_build_logic | |
| continue-on-error: true | |
| run: ./gradlew :build-logic:help | |
| - name: 🔏 Write build-logic locks (conditional) | |
| if: steps.check_build_logic.outcome == 'success' | |
| run: ./gradlew :build-logic:writeLocks --no-parallel --no-configuration-cache | |
| - name: 🔒 Write global locks | |
| run: ./gradlew writeLocks --no-parallel --no-configuration-cache | |
| - name: 💾 Commit file changes (auto) | |
| id: auto-pr-lockfile | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: "auto-pr/fix-lockfile" | |
| commit-message: "chore: auto fix lockfile [skip ci].." | |
| title: "chore: auto fix lockfile [skip ci].." | |
| labels: | | |
| pr|chore | |
| body: | | |
| ## Summary | |
| This PR fixes the lockfile. | |
| - name: 🔧 Show PR info | |
| env: | |
| PR_INFO: ${{ toJSON(steps.auto-pr-lockfile.outputs) }} | |
| run: | | |
| echo "PR info: $PR_INFO" |