This action generates periodic umami reports into a given file, and action outputs.
Accepted periods are: 1h, 1d, 1w, 1m.
input name | required | description |
---|---|---|
umami-server |
yes | Umami server instance (*). |
umami-user |
yes | Umami API user. Default "admin" . |
umami-password |
yes | Umami API password. |
umami-site-domain |
no | Umami site domain name (*). |
umami-report-file |
no | Umami report file to generate. |
umami-report-content |
no | Report content to generate (*). |
umami-period |
no | (main) Report data/analysis period (*). |
umami-unit |
no | (main) Report interval unit (*). |
umami-tz |
no | (main) Report date time timezone (*). |
legend*:
- Umami API login expected to be available at
<umami-server>/api/auth/login
. umami-site-domain
is the target analysis domain name, example"www.mysite.com"
(select first domain by default ).umami-report-content
default ispageviews|events|urls
(stats is always reported).umami-period
default is24h
(means 24 hours). But you can switch it to24h
/7d
/1w
/31d
/1m
.umami-unit
default ishour
. But you can switch it today
depend on the period you choose.umami-tz
default isEurope/Paris
. But you can switch it to another timezone supported by Umami API (ex.America/Los_Angeles
).
This action produces some "action results" where an action result is a resultName
, and a resultValue
.
Each action result is available as output parameter : to use in following step
orjob
resultName | resultValue | description |
---|---|---|
pageViews |
integer | number of pageView in last 24h |
umamiOneLineReport |
string | short summary of domain stats |
umamiReport |
multi-lines string | detailed report of domain stats |
umamiReportLength |
int | v1.2, detailed report length |
When an umami-report-file
is set, the target file is written in ./umami/<umami-report-file>
.
jobs:
umamiReport:
name: umami report example
runs-on: ubuntu-latest
steps:
- name: Create Umami report
id: umamiReport
uses: boly38/action-umami-report@umami-server-2.12
with:
umami-server: https://${{secrets.UMAMI_SERVER}}
umami-user: ${{secrets.UMAMI_USERNAME}}
umami-password: ${{secrets.UMAMI_PASSWORD}}
umami-site-domain: ${{secrets.UMAMI_SITE_DOMAIN}}
umami-report-file: 'umamiReport.md'
- name: Send Umami report to discord channel
uses: tsickert/discord-webhook@v4.0.0
with:
webhook-url: ${{ secrets.UMAMI_TO_DISCORD_WEBHOOK_URL }}
content: ${{ steps.umamiReportStep.outputs.umamiOneLineReport }}
Full working sample: cf. daily_umami_report.yml
TIP: if your umami server version is not compatible with current GithubActions, you could change umami-server-2.9.0
keyword by one of the current repository tags with umami-server-x.y
format.
Umami server :
Umami API clients:
- jakobbouchard TS/JS umami-api-client
- Import:
import UmamiApiClient from 'umami-api'
- Import:
- boly38 JS umami-api-client
- Import:
import UmamiClient from 'umami-api-client'
- Import:
You're not a dev ? just submit an issue (bug, improvements, questions).
Or else:
- Clone
- Install deps
- setup your test environment (cf. initenv.template.sh)
cp ./env/initenv.template.sh ./env/initenv.dontpush.sh
. ./env/initenv.dontpush.sh
- Then run manual test
git clone https://github.com/boly38/action-umami-report.git
cd action-umami-report
npm install
npm run day
npm run debugDay
npm run showResults
# check other targets in package.json
- you could also fork, feature branch, then submit a pull request.
-
Github actions - Continuous vulnerability audit.
-
Houndci - JavaScript automated review (configured by
.hound.yml
).
-
gren - Release notes automation.