A GitHub action that tracks orcs-have-issues game achievements and adds badges to a profile readme.
Create a character in the orcs-have-issues repository to earn your first badge.
Create a new repository named YourLogin/YourLogin
on GitHub with a README.md file to manage your profile readme. Replace YourLogin
with your GitHub username.
Edit README.md and add the following comment lines (badges will appear between them):
<!-- orcs-earn-badges -->
<!-- orcs-earn-badges -->
Create a new workflow (add file) in your repository at .github/workflows/orcs-earn-badges.yml
:
name: Orcs Have Issues Badges
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
update-badges:
runs-on: ubuntu-latest
steps:
- name: Orcs Have Issues Profile Badges
uses: MikeAmputer/orcs-earn-badges@v1
with:
token: ${{ secrets.REPOSITORY_TOKEN }}
This will automatically run the action daily at 1:30 UTC (1 hour after the game simulation), and will also let you to run it manually right now or any other time.
Generate a Personal Access Token with contents
write permission. This token will be used to update the readme file.
Copy the token and navigate to /settings/secrets/actions
of your repository.
Create a new repository secret REPOSITORY_TOKEN
with the value of the created token.
To validate setup, navigate to the /actions/workflows/orcs-earn-badges.yml
and run the workflow manually.
You can check the result in my profile, and an example of installation in my profile repository.