Skip to content

welpo/doteki-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

doteki logo: a river passing through a bamboo forest
GitHub version Documentation Build status
License Clean commits Powered by dōteki

🎋 Run dōteki Action

This GitHub action runs dōteki to update your GitHub profile README with dynamic content.

Usage

  1. Follow the Initial Setup instructions from dōteki to set up doteki.toml and the matching markers in README.md.

  2. In your profile repository, create the workflow file .github/workflows/doteki.yaml with the following content:

name: Update README with dōteki

on:
  push:
  workflow_dispatch:
  schedule:
    - cron: '51 * * * *'  # Every hour at XX:51.

jobs:
  update-readme:
    runs-on: ubuntu-latest
    permissions:
      contents: write  # Necessary to push changes.
    steps:
      - name: Run dōteki action
        uses: welpo/doteki-action@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This workflow will run every time you push to your repository, every hour at XX:51, and when you manually trigger it from the Actions tab.

What's inside the workflow file?
  • name: 'Update README with dōteki' labels the action. You'll see this name in the Actions tab.
  • on: Indicates when the action should run. In this case, it runs on push, when manually triggered, and every hour at XX:51.
  • jobs: The 'update-readme' job defines the action's tasks.
  • runs-on: The job runs on the latest Ubuntu version ('ubuntu-latest').
  • permissions: 'contents: write' allows changes to the repository. Otherwise the README couldn't be updated.
  • steps:
    • Runs the latest version of the dōteki action ('welpo/doteki-action@main').
  • env: Uses 'GITHUB_TOKEN' to authenticate with GitHub. This is necessary to push changes to the repository.
  1. Commit and push the workflow file to your repository.

  2. That's it! The action will run automatically and update your README.

Frequently Asked Questions

How do I configure dōteki?

Simply modify doteki.toml and the README markers. See the docs.

You don't need to modify the workflow file unless you want to change the schedule, the doteki-action version, or the environment variables.

A plugin needs me to set an environment variable. How do I do that?

If a plugin is asking you to set an environment variable, it's because it needs to access sensitive information, such as an API key. If you added this information to doteki.toml, it would be visible to anyone who can see your repository.

The solution is to use GitHub's secrets.

On your profile repository, go to the "Settings" tab and click on "Secrets and variables", then "Actions".

There you can create a new repository secret, say, "lastfm", and add the value for the variable there:

Creating a secret

Finally, in your workflow file, add a line at the end of the steps section, inside env:

env:
  DOTEKI_LASTFM_API_KEY: ${{ secrets.lastfm }}

Note: The string on the left side is the name of the environment variable that the plugin expects. secrets.<name> must match the name of the secret you created.

Something didn't go as expected. Where can I find logs?

Open your GitHub profile repository and go to the "Actions" tab. There you will find a list of all the workflows that have been run:

Actions tab

Click on the one you are interested in, and then on the "update-readme" job.

There you can search the logs or open the "Run dōteki action" step to see the full logs. For example, if you used an invalid Last.fm API key, you would see:

Logs showing a lastfm plugin error"

I have a question that is not answered here. What should I do?

Don't hesitate to reach out via the issue tracker, discussions, or email.