Skip to content

Commit

Permalink
add progress tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
merrywhether committed Dec 5, 2024
1 parent c43a24c commit a2dd87a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/readme-stars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update README ⭐
on:
schedule:
- cron: "0 11 * 12 *"
push:
branches:
- main
workflow_dispatch:

jobs:
update-readme:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check year for cron
if: github.event_name == 'schedule'
run: |
current_year=$(date +'%Y')
if [ "$current_year" -ne "2024" ]; then
echo "No longer 2024, delete this action's schedule."
exit 1
fi
- name: Check commit message for push
if: github.event_name == 'push'
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
if ! [[ "$COMMIT_MESSAGE" =~ ^day\ [0-9]{2}$ ]]; then
echo "Commit message does not match solution pattern"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v4

- uses: k2bd/advent-readme-stars@v1
with:
userId: 4388690
year: 2024
sessionCookie: ${{ secrets.AOC_SESSION }}

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: auto-update README stars
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Use the `test` task to run all tests against the sample data (mostly for CI):
deno run test
```

<!--- advent_readme_stars table --->

## Useful references

- https://github.com/denoland/advent-of-code-2024
Expand Down

0 comments on commit a2dd87a

Please sign in to comment.