Skip to content

Commit 9cdb0ec

Browse files
committed
Add badges code for 2024
1 parent bddd670 commit 9cdb0ec

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/badges.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v3 # clones your repo
1616

17+
- uses: joblo2213/aoc-badges-action@v3
18+
with:
19+
userid: 23810 # your user id, see setup on how to obtain
20+
session: ${{ secrets.AOC_SESSION }} # secret containing session code, see setup on how to obtain
21+
year: 2024 # The year for which stats should be retrieved
22+
file: 'README.md' # The file that contains the badges
23+
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/stars%20⭐-)[0-9]+(?=-yellow&year=2024)' # Regular expression that finds the content of the stars badge in your file.
24+
daysCompletedRegex: '(?<=https:\/\/img\.shields\.io\/badge\/days%20completed-)[0-9]+(?=-red&year=2024)' # Regular expression that finds the content of the days completed badge in your file.
25+
26+
1727
- uses: joblo2213/aoc-badges-action@v3
1828
with:
1929
userid: 23810 # your user id, see setup on how to obtain

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ My [Advent Of Code](https://adventofcode.com/) solutions in Python.
33

44
| Year | days completed | stars collected |
55
|---|---|---|
6-
| 2023 | ![](https://img.shields.io/badge/days%20completed-6-red&year=2023) | ![](https://img.shields.io/badge/stars%20⭐-12-yellow&year=2023) |
6+
| 2024 | ![](https://img.shields.io/badge/days%20completed-0-red&year=2024) | ![](https://img.shields.io/badge/stars%20⭐-0-yellow&year=2024) |
7+
| 2023 | ![](https://img.shields.io/badge/days%20completed-0-red&year=2023) | ![](https://img.shields.io/badge/stars%20⭐-0-yellow&year=2023) |
78
| 2022 | ![](https://img.shields.io/badge/days%20completed-6-red&year=2022) | ![](https://img.shields.io/badge/stars%20⭐-12-yellow&year=2022) |
89
| 2021 | ![](https://img.shields.io/badge/days%20completed-8-red&year=2021) | ![](https://img.shields.io/badge/stars%20⭐-17-yellow&year=2021) |
910
| 2020 | ![](https://img.shields.io/badge/days%20completed-8-red&year=2020) | ![](https://img.shields.io/badge/stars%20⭐-18-yellow&year=2020) |

0 commit comments

Comments
 (0)