athul / waka-readme

Wakatime Weekly Metrics on your Profile Readme.
https://github.com/athul
MIT License
1.56k stars 302 forks source link

Hi, I still have problem with using it. #17

Closed Stanley-Yao closed 4 years ago

Stanley-Yao commented 4 years ago

I really love this cool project. While I am trying that I have a problem with rendering the stuff in my personal Profile Readme.md My code is like the following:

<!--START_SECTION:waka-->

....
....

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: ${{ MY-WAKA-TIME-API-KEY }}
<!--END_SECTION:waka-->

Thanks for your help.

athul commented 4 years ago

Hey @Stanley-Yao , Is it possible to point us to the repo where the action is being run?

If it isn't being run anywhere try these methods

name: Waka Readme
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: ${{ MY-WAKA-TIME-API-KEY }

I added workflow_dispatch for you to manually trigger the workflow.

That's it. If this method didn't work. Please do keep us posted

athul commented 4 years ago

Hey @Stanley-Yao I checked your repo and please don't save your api key in the file itself. This is due to security issues. Save it in your repo secrets https://github.com/Stanley-Yao/Stanley-Yao/settings/secrets

Here is a reference of the yml file I use

# 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
  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 }}
Stanley-Yao commented 4 years ago

Hi @athul Thanks for your detailed reply. I am new to the workflow and secret, so that I didn't realize those are the thing you were talking about. Now I have an idea and just successfully updated my profile! Kudos to you!

Stanley-Yao commented 4 years ago

Actually do you mind if I make a PR to improve the Read me? So that it explains better to the newbees like me LOL.

athul commented 4 years ago

Sure. All PRs are welcome 😊

Stanley-Yao commented 4 years ago

I can't setup a remote branch. Do you have a prefered branch to let me work on? Or maybe could you change the permission? Thanks.

athul commented 4 years ago

You could fork the repo and send a PR from the fork

athul commented 4 years ago

Closing this. If you have any queries feel free to open a new issue