Before creating a new repository from this template, perform the following steps.
Open Personal access tokens (classic) settings and verify if there is any
PAT_TOKEN
or if it is nearly to expire.
If there is no PAT_TOKEN
created:
- Click on Generate New Token.
- Select
repo
checkbox. - Copy the token.
If there is an existing PAT_TOKEN
:
- Click on it.
- If the expiration date is due soon, click on regenerate the token.
- Update the
PAT_TOKEN
at this template repository.
Open dependency graph settings and manually run the following jobs:
pom.xml
.github/workflows/build-report.yml
Review and merge any pending pull requests.
Follow this steps after housekeeping is finished.
- Open the main page of the template repository.
- Click on Use this template.
- Select Create a new repository:
- Give a name to the new repository. Example:
advent-of-code-2022
.
- Give a name to the new repository. Example:
Add the previously mentioned PAT_TOKEN
to this new repository.
- Go to Codacy and add the repository.
- Open Settings / Coverage and copy the
CODACY_PROJECT_TOKEN
value. - Open the created repository.
- Open Settings / Secrets and variables / Actions and click on New repository secret:
- Name:
CODACY_PROJECT_TOKEN
- Secret: The previously copied token.
- Name:
- Go to Settings / Actions / General.
- Under Workflow permissions:
- Enable Read and write permissions.
- Enable Allow GitHub Actions to create and approve pull requests.
- Go to Actions and open the Update year workflow:
- Click on Run workflow.
- Type the year in
yyyy
format and click on Run workflow.
After the workflow has ended a Pull Request will be created:
- Open the pull request.
- Verify everything is right and then merge it.
After the PR is merged the repository will have its description and topics updated. Also, all README.md
and pom.xml
will be updated with current year value. The PR can be declined and workflow can be executed again if there was any problem that needed a fix.
- Create a private data repository using advent-of-code-yyyy-data template repository and set it up.
- Add the data repository as a submodule using the command:
git clone https://github.com/Flashky/advent-of-code-{year}.git &&
cd advent-of-code-{year} &&
git submodule add -b master https://github.com/Flashky/advent-of-code-{year}-data.git src/test/resources/inputs &&
git push
- Go to Codacy and open the repository.
- Open Settings / General and copy both the
code quality
andcoverage
badges. - Add them to this
README.md
.
- Remove these instructions from
README.md
. - Push the changes and...
Enjoy your new Advent of Code edition!
- Day 1
- Day 2
- Day 3
- Day 4
- Day 5
- Day 6
- Day 7
- Day 8
- Day 9
- Day 10
- Day 11
- Day 12
- Day 13
- Day 14
- Day 15
- Day 16
- Day 17
- Day 18
- Day 19
- Day 20
- Day 21
- Day 22
- Day 23
- Day 24
- Day 25
Without data repository:
git clone https://github.com/Flashky/advent-of-code-{year}.git
Including data repository:
git clone https://github.com/Flashky/advent-of-code-{year}.git --recurse-submodules