mirror of https://github.com/usbharu/Hideout.git
Merge pull request #64 from usbharu/github-action
chore: GitHub Actionの改善
This commit is contained in:
commit
b94404258e
|
@ -13,6 +13,7 @@ on:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
@ -21,6 +22,29 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v3.3.2
|
||||||
|
with:
|
||||||
|
path: ~/.gradle/wrapper
|
||||||
|
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v3.3.2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/jars-*
|
||||||
|
~/.gradle/caches/transforms-*
|
||||||
|
~/.gradle/caches/modules-*
|
||||||
|
key: gradle-dependencies-${{ steps.cache-key.outputs.week }}-${{ hashFiles('**/*.gradle.kts') }}
|
||||||
|
restore-keys: gradle-dependencies-${{ steps.cache-key.outputs.week }}-
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v3.3.2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/build-cache-*
|
||||||
|
~/.gradle/caches/[0-9]*.*
|
||||||
|
.gradle
|
||||||
|
key: ${{ runner.os }}-gradle-build-${{ github.workflow }}-${{ steps.cache-key.outputs.week }}-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-gradle-build-${{ github.workflow }}-${{ steps.cache-key.outputs.week }}-
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
|
@ -30,3 +54,7 @@ jobs:
|
||||||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
||||||
with:
|
with:
|
||||||
arguments: detektMain
|
arguments: detektMain
|
||||||
|
- name: "reviewdog-suggester: Suggest any code changes based on diff with reviewdog"
|
||||||
|
uses: reviewdog/action-suggester@v1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -20,13 +20,37 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v3
|
- name: Cache
|
||||||
with:
|
uses: actions/cache@v3.3.2
|
||||||
java-version: '17'
|
with:
|
||||||
distribution: 'temurin'
|
path: ~/.gradle/wrapper
|
||||||
- name: Build with Gradle
|
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
|
||||||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
- name: Cache
|
||||||
with:
|
uses: actions/cache@v3.3.2
|
||||||
arguments: test
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/jars-*
|
||||||
|
~/.gradle/caches/transforms-*
|
||||||
|
~/.gradle/caches/modules-*
|
||||||
|
key: gradle-dependencies-${{ steps.cache-key.outputs.week }}-${{ hashFiles('**/*.gradle.kts') }}
|
||||||
|
restore-keys: gradle-dependencies-${{ steps.cache-key.outputs.week }}-
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v3.3.2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/build-cache-*
|
||||||
|
~/.gradle/caches/[0-9]*.*
|
||||||
|
.gradle
|
||||||
|
key: ${{ runner.os }}-gradle-build-${{ github.workflow }}-${{ steps.cache-key.outputs.week }}-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-gradle-build-${{ github.workflow }}-${{ steps.cache-key.outputs.week }}-
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: Gradle Build Action
|
||||||
|
uses: gradle/gradle-build-action@v2.8.1
|
||||||
|
with:
|
||||||
|
arguments: test
|
||||||
|
|
Loading…
Reference in New Issue