Last active
January 23, 2021 17:55
-
-
Save mirror-kt/96d2b598899ca0bea2b1798407e0994b to your computer and use it in GitHub Desktop.
GitHub Actions workflow file collections
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
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
assemble: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup JDK | |
uses: AdoptOpenJDK/install-jdk@v1 | |
with: | |
version: 8 | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Run ./gradlew --no-daemon assemble | |
run: ./gradlew --no-daemon assemble |
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
on: | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- "**/*.kts?" | |
jobs: | |
detekt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup JDK | |
uses: AdoptOpenJDK/install-jdk@v1 | |
with: | |
version: 8 | |
- name: Setup reviewdog | |
uses: reviewdog/action-setup | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run ./gradlew --no-daemon detekt | |
run: ./gradlew --no-daemon detekt | |
- name: Run reviewdog | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
for i in **/build/reports/detekt/detekt.xml; do | |
reviewdog -f=checkstyle -name=detekt -reporter=github-check < $i | |
done |
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
This is a collection for usually use workflows on GitHub Actions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment