File tree Expand file tree Collapse file tree 6 files changed +47
-7
lines changed
install/kubernetes/github-actions-cache-server
routes/[token]/_apis/artifactcache/caches Expand file tree Collapse file tree 6 files changed +47
-7
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,16 @@ jobs:
53
53
git config user.name "github-actions[bot]"
54
54
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
55
55
56
- VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
56
+ npx bumpp ${{ env[inputs.version] }} -y -r --commit "chore(release): v%s" --no-push
57
+
58
+ export VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
57
59
sed -E "s/^appVersion:.+$/appVersion: '$VERSION'/" -i install/kubernetes/github-actions-cache-server/Chart.yaml
58
60
git stage install/kubernetes/github-actions-cache-server/Chart.yaml
59
- git commit -nm "chore(release): update helm chart appVersion to $VERSION"
61
+ git commit -n --no-edit --amend
62
+ git tag -f "v$VERSION"
60
63
61
- npx bumpp ${{ env[inputs.version] }} -y -r --commit "chore(release): v%s"
64
+ git push origin dev
65
+ git push origin --tags
62
66
63
67
echo "RELEASE_REF=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
64
68
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 : ' 4.0.3 '
Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ export async function findKeyMatch(
163
163
}
164
164
}
165
165
166
+ export async function listEntriesByKey ( db : DB , key : string ) {
167
+ return db . selectFrom ( 'cache_keys' ) . where ( 'key' , '=' , key ) . selectAll ( ) . execute ( )
168
+ }
169
+
166
170
export async function updateOrCreateKey (
167
171
db : DB ,
168
172
{
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" :
" [email protected] " ,
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