提交 c469bfb7 编写于 作者: A athul

Readme Updates and Usages in Profile Repo

上级 6a5ebb1a
# This is a basic workflow to help you get started with Actions
name: Waka Readme
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
schedule:
# Runs at 12am UTC
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update Readme
uses: athul/waka-readme@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN}}
......@@ -5,4 +5,4 @@ ADD requirements.txt /requirements.txt
ADD main.py /main.py
RUN pip install -r requirements.txt
CMD python main.py
\ No newline at end of file
CMD ["python", "/main.py"]
\ No newline at end of file
......@@ -15,34 +15,58 @@ The lines will be our entrypoints for our metrics.
## Using it
- Get a GitHub Access Token with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
- Get your Wakatime API Key and save it as `WAKATIME_API_KEY = <your wakatime API Key>` in your Repository Secrets
That's it. The Action runs everyday at 00.00 UTC
----
Here is Sample Worflow File
### Profile Repository
If you're executing the workflow on your Profile Repository (`<username>/<username>`)
**You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.**
Here is a sample workflow file for you to get started,
```yml
name: Waka Readme
on:
schedule:
# Runs at 12am UTC
- cron: '0 0 * * *'
jobs:
update-readme:
name: Update this repo's README
runs-on: ubuntu-latest
steps:
- uses: athul/waka-readme@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
```
### Different Repository than Profile Repository
if you're executing the workflow on another repo other than `<username>/<username>`
- Get a GitHub Access Token with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
Here is Sample Worflow File for running it
```yml
name: Waka Readme
on:
push:
branches: [ master ]
schedule:
# Runs at 12am UTC
- cron: '0 0 * * *'
jobs:
build:
update-readme:
name: Update Readme with Metrics
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update Readme
uses: athul/waka-readme@master
- uses: athul/waka-readme@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN}}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册