-
Add your wakatime api key from here, in your repository secrets with the name
WAKATIME_API_KEY
. -
Optional: If you are adding this action to a repository other than your profile repository (
<username>/<username>
), add your Github API Token from here, in your repository secrets with the nameGITHUB_TOKEN
. -
Go to actions tab of your repository, click
New workflow
, and then click the linkset up a workflow yourself
. -
Replace all the file contents with the following:
name: Wakatime Charts on: workflow_dispatch: schedule: - cron: "0 0 * * *" jobs: update-charts: name: Update wakatime stats charts runs-on: ubuntu-latest steps: - uses: dvjn/wakatime-charts@master with: WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # only required if using the action in repository other than profile
-
Commit this workflow file.
Note: The action will run at 00:00 UTC everyday to update the images.
BRANCH_NAME
: Set the branch on which charts are pushed. Defaults tomaster
COMMIT_MESSAGE
: Set the commit message for the changes. Defaults toπ
IMAGES_FOLDER
: Set the folder name in which generated images are stored. Defaults toimages
GIT_USER_EMAIL
: Set the user email for git config. Defaults to Github Action Bot's email41898282+github-actions[bot]@users.noreply.github.com
GIT_USER_NAME
: Set the user name for git config. Defaults toGithub Action
Link for the generated images is:
https://raw.githubusercontent.com/<username>/<repository>/<branch_name>/<images_folder>/<chart_name>.svg
Where, the chart name is one of wakatime_weekly_language_stats
and wakatime_weekly_project_stats
.