Actions Init
This commit is contained in:
parent
74594fa648
commit
4a9a347d32
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM python:latest
|
||||||
|
|
||||||
|
# Install dependencies.
|
||||||
|
ADD requirements.txt /requirements.txt
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
CMD python main.py
|
25
action.yml
Normal file
25
action.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: 'Waka - Readme'
|
||||||
|
author: Athil Cyriac Ajay
|
||||||
|
description: 'Add a Wakatime Coding Activity graph in your Readme'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
GH_TOKEN:
|
||||||
|
description: 'GitHub access token with Repo scope'
|
||||||
|
default: ${{ github.token }}
|
||||||
|
|
||||||
|
WAKATIME_API_KEY:
|
||||||
|
description: 'Your Wakatime API Key'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
USERNAME:
|
||||||
|
description: 'Your GitHub username'
|
||||||
|
default: ${{ github.repository_owner }}
|
||||||
|
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: 'docker'
|
||||||
|
image: 'Dockerfile'
|
||||||
|
|
||||||
|
branding:
|
||||||
|
icon: 'info'
|
||||||
|
color: 'blue'
|
6
main.py
6
main.py
@ -8,9 +8,9 @@ START_COMMENT = '<!--START_SECTION:waka-->'
|
|||||||
END_COMMENT = '<!--END_SECTION:waka-->'
|
END_COMMENT = '<!--END_SECTION:waka-->'
|
||||||
listReg = f'{START_COMMENT}[\\s\\S]+{END_COMMENT}'
|
listReg = f'{START_COMMENT}[\\s\\S]+{END_COMMENT}'
|
||||||
|
|
||||||
user = os.getenv("USERNAME")
|
user = os.getenv("INPUT_USERNAME")
|
||||||
waka_key = os.getenv("WAKATIME_API_KEY")
|
waka_key = os.getenv("INPUT_WAKATIME_API_KEY")
|
||||||
ghtoken = os.getenv("GH_TOKEN")
|
ghtoken = os.getenv("INPUT_GH_TOKEN")
|
||||||
|
|
||||||
|
|
||||||
def makeGraph(percent: float):
|
def makeGraph(percent: float):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user