File tree Expand file tree Collapse file tree 6 files changed +46
-9
lines changed
install/kubernetes/github-actions-cache-server
routes/[token]/_apis/artifactcache/caches Expand file tree Collapse file tree 6 files changed +46
-9
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,14 @@ jobs:
55
55
56
56
npx bumpp ${{ env[inputs.version] }} -y -r --commit "chore(release): v%s"
57
57
58
- VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
59
- sed -E "s/^appVersion:.+$/appVersion: '$VERSION'/" -i install/kubernetes/github-actions-cache-server/Chart.yaml
60
- git stage install/kubernetes/github-actions-cache-server/Chart.yaml
61
- git commit --amend --no-edit
62
-
63
58
echo "RELEASE_REF=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
64
59
60
+ - name : ⬆️ Bump Helm chart app version
61
+ run : |
62
+ VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//') sed -E "s/^appVersion:.+$/appVersion: '$VERSION'/" -i install/kubernetes/github-actions-cache-server/Chart.yaml
63
+ git stage install/kubernetes/github-actions-cache-server/Chart.yaml
64
+ git commit -nm "chore(release): update helm chart appVersion to $VERSION"
65
+
65
66
- name : 📥 Create release PR
66
67
id : create-release-pr
67
68
run : |
Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ ENV BUILD_HASH=${BUILD_HASH}
5
5
6
6
WORKDIR /app
7
7
8
- RUN corepack enable
9
- RUN corepack prepare pnpm@latest-9 --activate
8
+ RUN npm install -g pnpm@latest-9
10
9
11
10
COPY package.json pnpm-lock.yaml .npmrc ./
12
11
COPY patches patches
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ version: 0.1.1
21
21
# incremented each time you make changes to the application. Versions are not expected to
22
22
# follow Semantic Versioning. They should reflect the version the application is using.
23
23
# It is recommended to use it with quotes.
24
- appVersion : ' 4.0.1 '
24
+ appVersion : ' '
Original file line number Diff line number Diff line change @@ -151,6 +151,10 @@ export async function findKeyMatch(
151
151
}
152
152
}
153
153
154
+ export async function listEntriesByKey ( db : DB , key : string ) {
155
+ return db . selectFrom ( 'cache_keys' ) . where ( 'key' , '=' , key ) . selectAll ( ) . execute ( )
156
+ }
157
+
154
158
export async function updateOrCreateKey (
155
159
db : DB ,
156
160
{
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " github-actions-cache-server" ,
3
3
"type" : " module" ,
4
- "version" : " 4.0.2 " ,
4
+ "version" : " 4.0.3 " ,
5
5
"private" : true ,
6
6
"packageManager" : " pnpm@9.1.3" ,
7
7
"engines" : {
Original file line number Diff line number Diff line change
1
+ import { z } from 'zod'
2
+
3
+ import { auth } from '~/lib/auth'
4
+ import { listEntriesByKey , useDB } from '~/lib/db'
5
+
6
+ const queryParamSchema = z . object ( {
7
+ key : z . string ( ) . min ( 1 ) ,
8
+ } )
9
+
10
+ export default defineEventHandler ( {
11
+ onRequest : [ auth ] ,
12
+ handler : async ( event ) => {
13
+ const parsedQuery = queryParamSchema . safeParse ( getQuery ( event ) )
14
+ if ( ! parsedQuery . success )
15
+ throw createError ( {
16
+ statusCode : 400 ,
17
+ statusMessage : `Invalid query parameters: ${ parsedQuery . error . message } ` ,
18
+ } )
19
+
20
+ const { key } = parsedQuery . data
21
+
22
+ const db = useDB ( )
23
+ const entries = await listEntriesByKey ( db , key )
24
+
25
+ return {
26
+ totalCount : entries . length ,
27
+ artifactCaches : entries . map ( ( entry ) => ( {
28
+ cacheKey : entry . key ,
29
+ cacheVersion : entry . version ,
30
+ } ) ) ,
31
+ }
32
+ } ,
33
+ } )
You can’t perform that action at this time.
0 commit comments