This GitHub Action creates a GitHub contribution calendar on a 3D profile image.
This action generate your github profile 3d contribute calendar and make a commit to your repo. You can also trigger action by yourself after add this action.
Create a repository on GitHub with the same name as your user name.
- e.g. If the user name is
octocat
, create a repository namedoctocat/octocat
. - ref. Managing your profile README
In this repository, do the following.
Create a workflow file like the one below.
.github/workflows/profile-3d.yml
The schedule is set to start once a day. Please correct the startup time to a convenient time.
name: GitHub-Profile-3D-Contrib
on:
schedule: # 03:00 JST == 18:00 UTC
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v3
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git diff --staged --exit-code || (git commit -m "generated" && git push)
Note: If you also want to include the private repository, register the "personal access token" in the repository and set it to GITHUB_TOKEN specified in the workflow file.
This will add the action to the repository.
GITHUB_TOKEN
: (required) access tokenUSERNAME
: (required) target user name (or specify with an argument).MAX_REPOS
: (optional) max repositories, default 100 - since ver. 0.2.0MAX_LANGUAGES
: (optional) maximum number of languages to display on pie chart, default 5.IGNORE_LANGUAGES
: (optional) comma delimited list of languages to ignore.SETTING_JSON
: (optional) settings json file path. Seesample-settings/*.json
andsrc/type.ts
inyoshi389111/github-profile-3d-contrib
repository for details. - since ver. 0.6.0
Launch the added action.
Actions
->GitHub-Profile-3D-Contrib
->Run workflow
The profile image is generated with the following paths.
profile-3d-contrib/profile-green-animate.svg
profile-3d-contrib/profile-green.svg
profile-3d-contrib/profile-season-animate.svg
profile-3d-contrib/profile-season.svg
profile-3d-contrib/profile-south-season-animate.svg
profile-3d-contrib/profile-south-season.svg
profile-3d-contrib/profile-night-view.svg
profile-3d-contrib/profile-night-green.svg
profile-3d-contrib/profile-night-rainbow.svg
profile-3d-contrib/profile-gitblock.svg
Alternatively, if SETTING_JSON
is specified, the following image will be generated.
profile-3d-contrib/profile-customize.svg
example: green version
example: season version (Northern Hemisphere.)
example: season version (Southern Hemisphere.)
example: night view version
example: night green version
example: night rainbow version
example: git block version
Add the path of the generated image to the readme file.
e.g.
![](./profile-3d-contrib/profile-green-animate.svg)
Set the GITHUB_TOKEN
environment variable to the value of "personal access token".
export GITHUB_TOKEN=XXXXXXXXXXXXXXXXXXXXX
Run it with your GitHub user specified.
node_modules/.bin/ts-node src/index.ts USER_NAME
or
npm run build
node . USER_NAME
MIT License
(C) 2021 SATO, Yoshiyuki