diff --git a/.github/workflows/assayo.yml b/.github/workflows/assayo.yml index e471f66..c5e109b 100644 --- a/.github/workflows/assayo.yml +++ b/.github/workflows/assayo.yml @@ -10,7 +10,7 @@ on: # (if you have a lot of people and frequent commits) # Remove this for small teams: schedule: - - cron: '3 * * * *' + - cron: '0 0 */5 * *' # Run by PR # (if you have few people and commits are rarely made) diff --git a/actions.yml b/actions.yml new file mode 100644 index 0000000..c72fbb0 --- /dev/null +++ b/actions.yml @@ -0,0 +1,45 @@ +# Creates an HTML report +# with analysis of commit statistics. +# +# More information: https://github.com/bakhirev/assayo +name: Assayo +description: Report with analysis of commit statistics +author: bakhirev + +branding: + icon: 'info' + color: 'blue' + +inputs: + add_file_info: + description: "Add information about files in report?" + default: "true" + +runs: + using: composite + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Download report template + run: | + git clone https://github.com/bakhirev/assayo.git + shell: bash + + - if: ${{ env.add_file_info }} + run: | + git --no-pager log --raw --numstat --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%aN>%aE>%s" | sed -e 's/\\/\\\\/g' | sed -e 's/`/"/g' | sed -e 's/\$/S/g' | sed -e '1s/^/R(f\`/' | sed -e '$s/$/\`\);/' > ./assayo/build/log.txt + shell: bash + + - if: ${{ !env.add_file_info }} + run: | + git --no-pager log --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%aN>%aE>%s" | sed -e 's/\\/\\\\/g' | sed -e 's/`/"/g' | sed -e 's/\$/S/g' | sed -e '1s/^/R(f\`/' | sed -e '$s/$/\`\);/' > ./assayo/build/log.txt + shell: bash + + - name: Archive the report as an artifact + uses: actions/upload-artifact@v4 + with: + name: Commit statistics report + path: ./assayo/build/