Created
September 3, 2019 07:18
-
-
Save wasabeef/60113a9d4dec64ad71a901c089aae8b5 to your computer and use it in GitHub Desktop.
Scheduled ktlint with Github Actions
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
# .github/workflows/daily-ktlint.yml | |
name: Android CI (Ktlint) | |
on: | |
schedule: | |
# Daily 7am (JST) | |
- cron: '00 22 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: ktlintFormat | |
continue-on-error: true | |
run: ./gradlew --no-daemon -Dorg.gradle.parallel=false -Dorg.gradle.configureondemand=false ktlintFormat | |
- name: Create Pull Request | |
uses: cats-oss/create-pull-request@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} | |
PULL_REQUEST_BRANCH: daily-ktlint | |
COMMIT_MESSAGE: Auto-modify files by daily ktlint | |
PULL_REQUEST_TITLE: Changes from daily ktlint | |
PULL_REQUEST_BODY: This is an auto-generated PR with changes from daily ktlint | |
AUTHOR_EMAIL: ********@email.com | |
AUTHOR_NAME: your-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is pretty cool, thanks for sharing!!