diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 223d7048f..494c0acac 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -7,6 +7,11 @@ "github>msfjarvis/shared-workflows//renovate/automerge" ], "branchConcurrentLimit": 15, + "github-actions": { + "fileMatch": [ + ".github/reusable-workflows/.+\\.ya?ml$", + ], + }, "packageRules": [ { matchDatasources: [ diff --git a/.github/reusable-workflows/setup-gradle/action.yml b/.github/reusable-workflows/setup-gradle/action.yml new file mode 100644 index 000000000..96391b0d8 --- /dev/null +++ b/.github/reusable-workflows/setup-gradle/action.yml @@ -0,0 +1,42 @@ +name: 'Setup Gradle' +description: 'Checks out the repository and sets up Java and Gradle' +inputs: + token: + description: 'token input for actions/checkout' + required: false + default: ${{ github.token }} + fetch-depth: + description: 'fetch-depth input for actions/checkout' + required: false + default: 1 + cache-read-only: + description: 'cache-read-only input for gradle/actions/setup-gradle' + required: false + default: ${{ github.event.repository != null && github.ref_name != github.event.repository.default_branch }} + dependency-graph: + description: 'dependency-graph input for gradle/actions/setup-gradle' + required: false + default: 'disabled' +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: ${{ inputs.fetch-depth }} + token: ${{ inputs.token }} + + - name: Set up JDK + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + distribution: temurin + java-version: 18 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3 + with: + gradle-home-cache-cleanup: true + cache-read-only: ${{ inputs.cache-read-only }} + add-job-summary: always + dependency-graph: ${{ inputs.dependency-graph }} + validate-wrappers: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74bd74f7a..189f0aae2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,23 +18,11 @@ jobs: check: runs-on: macos-14 steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup build environment + uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main with: fetch-depth: 0 - - - name: Set up JDK - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 - with: - distribution: temurin - java-version: 18 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3 - with: cache-read-only: ${{ github.ref != 'refs/heads/main' }} - gradle-home-cache-cleanup: true - add-job-summary: always dependency-graph: generate-and-submit - name: Check changelog format diff --git a/.github/workflows/code_quality_analysis.yml b/.github/workflows/code_quality_analysis.yml index 5300dce53..93daec03e 100644 --- a/.github/workflows/code_quality_analysis.yml +++ b/.github/workflows/code_quality_analysis.yml @@ -22,18 +22,10 @@ jobs: name: CodeQL runs-on: macos-14 steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Set up JDK - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 - with: - distribution: temurin - java-version: 18 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3 + - name: Setup build environment + uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main with: + fetch-depth: 0 cache-read-only: true - name: Initialize CodeQL diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e4c991a5..ed4ae7f46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,23 +15,12 @@ jobs: publish-google-play-release: runs-on: macos-14 steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup build environment + uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main with: token: ${{ secrets.POST_RELEASE_GH_TOKEN }} fetch-depth: 0 - - - name: Set up JDK - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 - with: - distribution: temurin - java-version: 18 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3 - with: cache-read-only: ${{ github.ref != 'refs/heads/main' }} - gradle-home-cache-cleanup: true - name: Set up Git author shell: bash diff --git a/.github/workflows/tramline-release.yml b/.github/workflows/tramline-release.yml index aa317ae73..b02e659b1 100644 --- a/.github/workflows/tramline-release.yml +++ b/.github/workflows/tramline-release.yml @@ -16,20 +16,10 @@ jobs: signed-build: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Set up JDK - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 - with: - distribution: temurin - java-version: 18 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3 + - name: Setup build environment + uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main with: cache-read-only: true - gradle-home-cache-cleanup: true - name: Build release app run: | diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f90e459b1..9a5c16144 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,7 @@ coroutines = "1.8.1-Beta" dagger = "2.51.1" glance = "1.0.0" junit = "5.10.2" -konvert = "3.1.0" +konvert = "3.2.0" kotlin = "1.9.23" kotlinResult = "2.0.0" lifecycle = "2.8.0-alpha04"