mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
refactor(ci): introduce a reusable workflow
This commit is contained in:
parent
e272427031
commit
7b07a4676b
6 changed files with 55 additions and 50 deletions
5
.github/renovate.json5
vendored
5
.github/renovate.json5
vendored
|
@ -7,6 +7,11 @@
|
||||||
"github>msfjarvis/shared-workflows//renovate/automerge"
|
"github>msfjarvis/shared-workflows//renovate/automerge"
|
||||||
],
|
],
|
||||||
"branchConcurrentLimit": 15,
|
"branchConcurrentLimit": 15,
|
||||||
|
"github-actions": {
|
||||||
|
"fileMatch": [
|
||||||
|
".github/reusable-workflows/.+\\.ya?ml$",
|
||||||
|
],
|
||||||
|
},
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
matchDatasources: [
|
matchDatasources: [
|
||||||
|
|
41
.github/reusable-workflows/setup-gradle/action.yml
vendored
Normal file
41
.github/reusable-workflows/setup-gradle/action.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
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 }}
|
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -18,23 +18,11 @@ jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Setup build environment
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
|
|
||||||
with:
|
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
||||||
gradle-home-cache-cleanup: true
|
|
||||||
add-job-summary: always
|
|
||||||
dependency-graph: generate-and-submit
|
dependency-graph: generate-and-submit
|
||||||
|
|
||||||
- name: Check changelog format
|
- name: Check changelog format
|
||||||
|
|
14
.github/workflows/code_quality_analysis.yml
vendored
14
.github/workflows/code_quality_analysis.yml
vendored
|
@ -22,18 +22,10 @@ jobs:
|
||||||
name: CodeQL
|
name: CodeQL
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Setup build environment
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
|
||||||
|
|
||||||
- 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:
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
|
@ -15,23 +15,12 @@ jobs:
|
||||||
publish-google-play-release:
|
publish-google-play-release:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Setup build environment
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
||||||
fetch-depth: 0
|
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@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
|
|
||||||
with:
|
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
||||||
gradle-home-cache-cleanup: true
|
|
||||||
|
|
||||||
- name: Set up Git author
|
- name: Set up Git author
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
14
.github/workflows/tramline-release.yml
vendored
14
.github/workflows/tramline-release.yml
vendored
|
@ -16,20 +16,10 @@ jobs:
|
||||||
signed-build:
|
signed-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Setup build environment
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
|
||||||
|
|
||||||
- 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:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
gradle-home-cache-cleanup: true
|
|
||||||
|
|
||||||
- name: Build release app
|
- name: Build release app
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue