muesli / markscribe

Your personal markdown scribe with template-engine and Git(Hub) & RSS powers 📜
MIT License
366 stars 40 forks source link

I have a problem when using your markscribe tool in my readme-update.yml #86

Open Chunnyluny opened 1 year ago

Chunnyluny commented 1 year ago

I have a problem when using your mark scribe tool in my readme-update.yml.

I have set everything correct, and it worked previously, but I use waka time graph in my workflow. So I run 2 jobs, 1 that fills in the readme.md.tpl template that contains all the code to fill update my README.md on my profile, and another GitHub action called stefanzweifel/git-auto-commit-action@v4.

I have attached the code to my workflow so that would be easier to see. Might be that I misunderstood the use of the GITHUB_TOKEN I thought I had to make a personal access token in fine-grained or classic personal token. I have set the wakatime api key from wakatime settings. So they are stored in my repository-secrets.

The first time I had an issue that the mark scribe was overwriting my wakatime update, so I managed to fix it by putting the wakatime action at the bottom. In other words it was going back in time, I have posted an issue on community to reference to the problem I also attach a link to my failing GitHub workflow I really hope you have any idea, also I got a warning about not finding the cache for setup-go, but I thought it should be made automatically, when setting up go env


on:
  push:
  workflow_dispatch:
  schedule:
    - cron: 0 */2 * * *
jobs:
  update-readme:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v4
        with:
          go-version: ^1
      - run: |
          go install github.com/muesli/markscribe@master
          markscribe ./templates/README.md.tpl > README.md
        shell: bash
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - uses: stefanzweifel/git-auto-commit-action@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          commit_message: updating README with recent activity
          branch: master
          commit_user_name: readme-scribe 🤖
          commit_user_email: 102756485+Chunnyluny@users.noreply.github.com
          commit_author: readme-scribe 🤖 <"102756485+Chunnyluny@users.noreply.github.com">
      - uses: athul/waka-readme@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
          SHOW_TITLE: true
          BLOCKS: ⣀⣄⣤⣦⣶⣷⣿
          TIME_RANGE: all_time
          SHOW_TIME: true
          SHOW_MASKED_TIME: true
          LANG_COUNT: 7
          COMMIT_MESSAGE: Updating README with new metrics
          SECTION_NAME: WAKA ```
Chunnyluny commented 1 year ago

I think I will fix it by making 2 different yml files. It is still failing first because it can't find go.sum as cache and second when I made 2 separate files for workflow I got an error related to the template that it couldn't execute it? If you do have time to look at it. It is found at chunnyluny/chunnyluny/templates/readme.md.tpl

in the new file, the wakatime action works and updates again, but the readme-scribe.yml didn't work as intended I have set secrets for wakatime, and secret called MY_GITHUB_TOKEN