diff --git a/README.md b/README.md index f092eba..3fed1b6 100644 --- a/README.md +++ b/README.md @@ -48,28 +48,43 @@ WakaTime gives you an idea of the time you really spent on coding. This helps yo > 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: +Please follow the steps below: -```yml -name: Waka Readme +1. Go to your `//actions`, hit `New workflow`, `set up a workflow yourself`, delete all the default content github made for you. +2. Copy the following code and paste it to your new workflow you created at step 1: + ```yml + name: Waka Readme -on: - schedule: - # Runs at 12am UTC - - cron: '0 0 * * *' + on: + workflow_dispatch + 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 }} -``` + 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 }} + ``` +3. Go to your repo secrets by hitting `Settings => Secrets` tab in your profile repo. You can also enter the url https://github.com/USERNAME/USERNAME/settings/secrets . Please replace the `USERNAME` with your own username. +4. Create a new `Secret`. `Name`: `WAKATIME_API_KEY`, `Value`: Paste the Wakatime API key here. If you don't know what is the key, please go to [Account Settings in WakaTime](https://wakatime.com/settings/account) to find your API Key there. +5. Add a comment to your `README.md` like this: + + ```md + + + ``` +6. Go to Workflows menu (mentioned in step 1), click `Waka Readme`, click `Run workflow`. +7. Go to your profile page. you will be able to see it. ### Other Repository (not Profile) + + *If you're executing the workflow on another repo other than `/`* You'll need to get a [GitHub Access Token](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = `