Skip to content

Commit e54a1c5

Browse files
Update GitHub template files
1 parent 33d934d commit e54a1c5

9 files changed

Lines changed: 682 additions & 129 deletions

File tree

.github/renovate.json5

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

.github/workflows/deployment.yaml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
starlight: ${{ steps.filter.outputs.starlight }}
2424
steps:
2525
- name: Check out the repo
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727

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

5151
- name: Checkout Repo
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5353

5454
- name: Setup PNPM
55-
uses: pnpm/action-setup@v3
55+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
5656

5757
- name: Setup Node
58-
uses: actions/setup-node@v4
58+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
5959
with:
6060
node-version: ${{ env.NODE_VERSION }}
6161
cache: "pnpm"
@@ -64,11 +64,11 @@ jobs:
6464
run: pnpm i
6565

6666
- name: Create Release Pull Request
67-
uses: changesets/action@v1
67+
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc # v1.4.10
6868
id: changesets
6969
with:
7070
version: pnpm run version
71-
commit: "chore: release"
71+
commit: "[ci] release"
7272
title: "[ci] release"
7373
env:
7474
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token}}
@@ -79,7 +79,8 @@ jobs:
7979
run: |
8080
git checkout changeset-release/main
8181
VERSION=$(node -p "require('./starlight/package.json').version")
82-
git commit --amend -m "chore(release): publish v$VERSION" --no-edit
82+
NAME=$(node -p "require('./starlight/package.json').name")
83+
git commit --amend -m "[ci] release $NAME v$VERSION" --no-edit
8384
git push origin changeset-release/main:changeset-release/main --force
8485
8586
image-tag:
@@ -89,7 +90,7 @@ jobs:
8990
IMAGE_TAG: ${{ env.IMAGE_TAG }}
9091
steps:
9192
- name: Check out the repo
92-
uses: actions/checkout@v4
93+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9394

9495
- name: Read version from package.json
9596
id: get_version
@@ -113,17 +114,17 @@ jobs:
113114
contents: write
114115
steps:
115116
- name: Check out the repo
116-
uses: actions/checkout@v4
117+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117118
with:
118119
fetch-depth: 0
119120

120121
- name: Setup PNPM
121-
uses: pnpm/action-setup@v3
122+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
122123
with:
123124
package_json_file: ./starlight/package.json
124125

125126
- name: Setup Node
126-
uses: actions/setup-node@v4
127+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
127128
with:
128129
node-version: ${{ env.NODE_VERSION }}
129130
cache: pnpm
@@ -140,22 +141,22 @@ jobs:
140141
working-directory: ./starlight
141142

142143
- name: Set up Docker Buildx
143-
uses: docker/setup-buildx-action@v3
144+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
144145

145146
- name: Log in to Docker Hub
146-
uses: docker/login-action@v3
147+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
147148
with:
148149
username: ${{ secrets.DOCKER_USERNAME }}
149150
password: ${{ secrets.DOCKER_PASSWORD }}
150151

151152
- name: Extract metadata (tags, labels) for Docker
152153
id: meta
153-
uses: docker/metadata-action@v5
154+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
154155
with:
155156
images: ${{ env.REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
156157

157158
- name: Build and push Docker image
158-
uses: docker/build-push-action@v6
159+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
159160
with:
160161
context: .
161162
push: true
@@ -168,7 +169,7 @@ jobs:
168169
run: |
169170
yq eval '.spec.template.spec.containers[0].image = "${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ needs.image-tag.outputs.IMAGE_TAG }}"' -i manifest/deployment.yaml
170171
171-
- uses: stefanzweifel/git-auto-commit-action@v4
172+
- uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
172173
with:
173174
commit_message: update deployment.json container image (automated)
174175

@@ -180,18 +181,18 @@ jobs:
180181
contents: write
181182
steps:
182183
- name: Check out the repo
183-
uses: actions/checkout@v4
184+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
184185

185186
- id: extract-changelog
186-
uses: sean0x42/[email protected]
187+
uses: sean0x42/markdown-extract@7b185cbe85263116bbf741e739e7198ba86465dc # v2.1.0
187188
with:
188189
file: starlight/CHANGELOG.md
189190
pattern: ${{ needs.image-tag.outputs.IMAGE_TAG }}
190191

191192
- uses: ncipollo/release-action@v1
192193
id: create_release
193194
with:
194-
tag: ${{ env.IMAGE_NAME }}-docs@${{ needs.image-tag.outputs.IMAGE_TAG }}
195+
tag: ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }}
195196
makeLatest: true
196197
body: ${{ steps.extract-changelog.outputs.markdown }}
197198
skipIfReleaseExists: true
@@ -209,7 +210,7 @@ jobs:
209210
if: env.RELEASE_SKIPPED == 'false'
210211
env:
211212
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
212-
uses: Ilshidur/[email protected]
213+
uses: Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9 # 0.3.2
213214
with:
214215
args: |
215216
# ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }}

.github/workflows/format.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
autofix:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1414

1515
- name: Setup PNPM
16-
uses: pnpm/action-setup@v3
16+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
1717

1818
- name: Setup Node
19-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
2020
with:
2121
node-version: 20
2222
cache: "pnpm"
@@ -32,6 +32,6 @@ jobs:
3232
- name: Run pngquant
3333
run: |
3434
shopt -s globstar
35-
find . -name '*.png' -exec pngquant --ext .png --force 256 {} \;
35+
find . -name '*.png' -exec pngquant --ext .png 256 {} \;
3636
37-
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
37+
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef

.github/workflows/labeler.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
- name: Ensure labels exist
2121
env:
2222
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
@@ -49,7 +49,7 @@ jobs:
4949
gh label create "🏯 styles" --description "Stylesheets or design updates" --color "550F5A" --force
5050
gh label create "🔒 wontfix" --description "This will not be worked on" --color "FFFFFF" --force
5151
52-
- uses: actions/labeler@v5
52+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5
5353
with:
5454
configuration-path: .github/labeler.yaml
5555
sync-labels: true

.github/workflows/welcome-bot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
- name: Convert Repository Name to Title Case
2525
id: convert_repo_name
2626
run: |

.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
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
},
1616
"devDependencies": {
1717
"@changesets/changelog-github": "^0.5.0",
18-
"@changesets/cli": "^2.27.11"
18+
"@changesets/cli": "^2.27.11",
19+
"@trivago/prettier-plugin-sort-imports": "5.2.2",
20+
"prettier": "3.5.3",
21+
"prettier-plugin-astro": "0.14.1"
1922
},
2023
"packageManager": "[email protected]"
2124
}

0 commit comments

Comments
 (0)