Skip to content

Commit 8c5b935

Browse files
ci: update GitHub template files
1 parent ded5ffa commit 8c5b935

11 files changed

Lines changed: 492 additions & 170 deletions

File tree

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"access": "public",
1111
"baseBranch": "main",
1212
"updateInternalDependencies": "patch",
13-
"ignore": []
13+
"ignore": ["starlight-automatic-overview-pages-docs"]
1414
}

.github/renovate.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
":disableDependencyDashboard",
5+
":disablePeerDependencies",
6+
":semanticPrefixFixDepsChoreOthers",
7+
":ignoreModulesAndTests",
8+
"workarounds:all",
9+
"helpers:pinGitHubActionDigestsToSemver",
10+
"docker:disable"
11+
],
12+
"rangeStrategy": "bump",
13+
"ignorePaths": ["**/node_modules/**"],
14+
"commitMessageSuffix": "[skip ci]",
15+
"assignees": [],
16+
"reviewers": [],
17+
"packageRules": [
18+
{
19+
"groupName": "github-actions",
20+
"matchManagers": ["github-actions"]
21+
},
22+
{
23+
"groupName": "npm-packages",
24+
"matchManagers": ["npm"],
25+
"matchDepTypes": ["dependencies", "devDependencies"],
26+
"separateMajorMinor": true
27+
},
28+
{
29+
"description": "Disable package manager version updates",
30+
"matchPackageNames": ["pnpm"],
31+
"matchDepTypes": ["packageManager"],
32+
"enabled": false
33+
}
34+
]
35+
}

.github/workflows/format.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,24 @@ on:
66
permissions:
77
contents: read
88

9+
env:
10+
NODE_VERSION: 24.10.0
11+
912
jobs:
1013
autofix:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+
with:
18+
persist-credentials: false
1419

1520
- name: Setup PNPM
16-
uses: pnpm/action-setup@v3
21+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
1722

1823
- name: Setup Node
19-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2025
with:
21-
node-version: 20
26+
node-version: ${{ env.NODE_VERSION }}
2227
cache: "pnpm"
2328

2429
- name: Install Dependencies
@@ -32,6 +37,6 @@ jobs:
3237
- name: Run pngquant
3338
run: |
3439
shopt -s globstar
35-
find . -name '*.png' -exec pngquant --ext .png --force 256 {} \;
40+
find . -name '*.png' -exec pngquant --ext .png 256 {} \;
3641
37-
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
42+
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/labeler.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ jobs:
1111
steps:
1212
- name: Generate GitHub App token
1313
id: generate_token
14-
uses: tibdex/[email protected]
14+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
1515
with:
1616
app_id: ${{ secrets.BOT_APP_ID }}
1717
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
1818

19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
with:
21+
persist-credentials: false
2022
- name: Ensure labels exist
2123
env:
2224
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
@@ -49,7 +51,7 @@ jobs:
4951
gh label create "🏯 styles" --description "Stylesheets or design updates" --color "550F5A" --force
5052
gh label create "🔒 wontfix" --description "This will not be worked on" --color "FFFFFF" --force
5153
52-
- uses: actions/labeler@v5
54+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
5355
with:
5456
configuration-path: .github/labeler.yaml
5557
sync-labels: true

.github/workflows/publish.yaml

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
env:
14-
REGISTRY: docker.io
15-
IMAGE_OWNER: trueberryless
1614
IMAGE_NAME: starlight-automatic-overview-pages
17-
NODE_VERSION: 20
15+
NODE_VERSION: 24.10.0
1816

1917
jobs:
2018
changes:
@@ -24,9 +22,11 @@ jobs:
2422
starlight-automatic-overview-pages: ${{ steps.filter.outputs.starlight-automatic-overview-pages }}
2523
steps:
2624
- name: Check out the repo
27-
uses: actions/checkout@v4
25+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+
with:
27+
persist-credentials: false
2828

29-
- uses: dorny/paths-filter@v3
29+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
3030
id: filter
3131
with:
3232
filters: |
@@ -44,19 +44,21 @@ jobs:
4444
steps:
4545
- name: Generate GitHub App token
4646
id: generate_token
47-
uses: tibdex/[email protected]
47+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
4848
with:
4949
app_id: ${{ secrets.BOT_APP_ID }}
5050
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
5151

5252
- name: Checkout Repo
53-
uses: actions/checkout@v4
53+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
54+
with:
55+
persist-credentials: false
5456

5557
- name: Setup PNPM
56-
uses: pnpm/action-setup@v3
58+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
5759

5860
- name: Setup Node
59-
uses: actions/setup-node@v4
61+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
6062
with:
6163
node-version: ${{ env.NODE_VERSION }}
6264
cache: "pnpm"
@@ -66,13 +68,21 @@ jobs:
6668

6769
- name: Create Release Pull Request
6870
id: changesets
69-
uses: changesets/action@v1
71+
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
7072
with:
71-
commit: "[ci] release"
72-
title: "[ci] release"
73+
commit: "ci: release"
74+
title: "ci: release [skip netlify]"
7375
env:
7476
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
75-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
77+
78+
- name: Get published version
79+
if: steps.changesets.outputs.hasChangesets == 'true'
80+
run: |
81+
git checkout changeset-release/main
82+
VERSION=$(node -p "require('./packages/starlight-automatic-overview-pages/package.json').version")
83+
NAME=$(node -p "require('./packages/starlight-automatic-overview-pages/package.json').name")
84+
git commit --amend -m "ci: release $NAME v$VERSION" --no-edit
85+
git push origin changeset-release/main:changeset-release/main --force
7686
7787
image-tag:
7888
name: Image Tag
@@ -81,7 +91,9 @@ jobs:
8191
IMAGE_TAG: ${{ env.IMAGE_TAG }}
8292
steps:
8393
- name: Check out the repo
84-
uses: actions/checkout@v4
94+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
95+
with:
96+
persist-credentials: false
8597

8698
- name: Read version from package.json
8799
id: get_version
@@ -93,25 +105,27 @@ jobs:
93105
needs: [changes, changesets, image-tag]
94106
if: >
95107
(
96-
needs.changesets.outputs.hasChangesets == 'false' &&
108+
needs.changesets.outputs.hasChangesets == 'false' &&
97109
(
98-
contains(github.event.head_commit.message, 'deploy') ||
99-
contains(github.event.head_commit.message, '[ci] release')
110+
contains(github.event.head_commit.message, 'deploy') ||
111+
contains(github.event.head_commit.message, 'release')
100112
)
101-
) ||
113+
) ||
102114
github.event_name == 'workflow_dispatch'
103115
runs-on: ubuntu-latest
104116
permissions:
105117
contents: write
106118
id-token: write
107119
steps:
108-
- uses: actions/checkout@v4
120+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
121+
with:
122+
persist-credentials: false
109123

110124
- name: Setup PNPM
111-
uses: pnpm/action-setup@v3
125+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
112126

113127
- name: Setup Node
114-
uses: actions/setup-node@v4
128+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
115129
with:
116130
node-version: ${{ env.NODE_VERSION }}
117131
cache: "pnpm"
@@ -122,9 +136,7 @@ jobs:
122136

123137
- run: |
124138
cd packages/starlight-automatic-overview-pages
125-
npm publish --provenance --access public
126-
env:
127-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
139+
npm publish --access public
128140
129141
release:
130142
name: Release
@@ -134,10 +146,12 @@ jobs:
134146
contents: write
135147
steps:
136148
- name: Check out the repo
137-
uses: actions/checkout@v4
149+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
150+
with:
151+
persist-credentials: false
138152

139153
- id: extract-changelog
140-
uses: sean0x42/[email protected]
154+
uses: sean0x42/markdown-extract@7b185cbe85263116bbf741e739e7198ba86465dc # v2.1.0
141155
with:
142156
file: packages/starlight-automatic-overview-pages/CHANGELOG.md
143157
pattern: ${{ needs.image-tag.outputs.IMAGE_TAG }}
@@ -163,7 +177,7 @@ jobs:
163177
if: env.RELEASE_SKIPPED == 'false'
164178
env:
165179
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
166-
uses: Ilshidur/action-discord@0.3.2
180+
uses: Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554 # 0.4.0
167181
with:
168182
args: |
169183
# ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }}

.github/workflows/welcome-bot.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ jobs:
1515
steps:
1616
- name: Generate GitHub App token
1717
id: generate_token
18-
uses: tibdex/[email protected]
18+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
1919
with:
2020
app_id: ${{ secrets.BOT_APP_ID }}
2121
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
2222

23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
with:
25+
persist-credentials: false
2426
- name: Convert Repository Name to Title Case
2527
id: convert_repo_name
2628
run: |
2729
REPO_NAME="${{ github.event.repository.name }}"
2830
TITLE_CASE_REPO_NAME=$(echo "$REPO_NAME" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2))} 1')
2931
echo "title_case_repo_name=$TITLE_CASE_REPO_NAME" >> $GITHUB_ENV
30-
- uses: zephyrproject-rtos/action-first-interaction@7e6446f8439d8b4399169880c36a3a12b5747699
32+
- uses: zephyrproject-rtos/action-first-interaction@58853996b1ac504b8e0f6964301f369d2bb22e5c
3133
with:
3234
repo-token: ${{ steps.generate_token.outputs.token }}
3335
pr-opened-message: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ out
9393
# Nuxt.js build / generate output
9494
.nuxt
9595
dist
96+
.output
9697

9798
# Gatsby files
9899
.cache/

.prettierrc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
{
2+
"plugins": ["prettier-plugin-astro", "@trivago/prettier-plugin-sort-imports"],
23
"trailingComma": "es5",
34
"tabWidth": 2,
45
"semi": true,
56
"singleQuote": false,
67
"endOfLine": "lf",
7-
"htmlWhitespaceSensitivity": "css"
8+
"htmlWhitespaceSensitivity": "css",
9+
"overrides": [
10+
{
11+
"files": "*.astro",
12+
"options": {
13+
"parser": "astro"
14+
}
15+
}
16+
],
17+
"importOrder": [
18+
"<THIRD_PARTY_MODULES>",
19+
"^@internal/(.*)$",
20+
"^@/models/(.*)$",
21+
"^@/utils/(.*)$",
22+
"^@/components/(?!ui/)(.*)$",
23+
"^@/components/ui/(.*)$",
24+
"^[./].*(?<!\\.(c|le|sc)ss)$",
25+
"^[.]/[-a-zA-Z0-9_]+[.](module)[.](css|scss|less)$"
26+
],
27+
"importOrderSeparation": true,
28+
"importOrderSortSpecifiers": true
829
}

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"sharp": "^0.33.5",
2727
"starlight-automatic-overview-pages": "workspace:*"
2828
},
29-
"packageManager": "pnpm@9.6.0",
29+
"packageManager": "pnpm@10.10.0",
3030
"engines": {
3131
"node": "^18.17.1 || ^20.3.0 || >=21.0.0"
3232
}

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@
1818
"version": "pnpm changeset version && pnpm i --no-frozen-lockfile"
1919
},
2020
"devDependencies": {
21-
"@changesets/changelog-github": "^0.5.0",
22-
"@changesets/cli": "^2.27.11"
21+
"@changesets/changelog-github": "^0.5.2",
22+
"@changesets/cli": "^2.29.8",
23+
"@trivago/prettier-plugin-sort-imports": "6.0.2",
24+
"prettier": "3.7.4",
25+
"prettier-plugin-astro": "0.14.1"
2326
},
24-
"packageManager": "pnpm@9.6.0",
27+
"packageManager": "pnpm@10.10.0",
2528
"engines": {
2629
"node": "^18.17.1 || ^20.3.0 || >=21.0.0"
2730
}

0 commit comments

Comments
 (0)