Merge pull request #13 from Ayagikei/android-build-cicd #20
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
name: Code Analytics | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
jobs: | |
detekt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "checkout" | |
uses: actions/checkout@v2 | |
- name: mkdir | |
run: mkdir reports | |
- name: "detekt" | |
uses: natiginfo/[email protected] | |
with: | |
args: --max-issues 9999 --report md:reports/detekt.md --auto-correct --parallel --plugins detekt/detekt-formatting-1.21.0.jar # --create-baseline | |
- name: "add & commit auto correct code" | |
uses: EndBug/[email protected] | |
with: | |
add: core/src | |
author_name: GitHub | |
author_email: [email protected] | |
# branch: master | |
message: "style: ktlint auto correct style for core module" | |
github_token: ${{ github.token }} | |
- name: "add & commit auto correct code" | |
uses: EndBug/[email protected] | |
with: | |
add: http/src | |
author_name: GitHub | |
author_email: [email protected] | |
# branch: master | |
message: "style: ktlint auto correct style for http module" | |
github_token: ${{ github.token }} | |
- name: "upload reports" | |
uses: actions/[email protected] | |
with: | |
name: reports | |
path: 'reports/*.*' | |
- name: "output to summary" | |
run: | | |
while read line | |
do | |
echo "$line" >> $GITHUB_STEP_SUMMARY | |
done < reports/detekt.md |