File tree 7 files changed +85
-6
lines changed
7 files changed +85
-6
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ .git
3
+ .gitignore
4
+ * .md
5
+ dist
Original file line number Diff line number Diff line change
1
+ name : Docker Release
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' v*.*.*'
6
+ pull_request :
7
+ branches :
8
+ - main
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+ - name : Setup release flow
15
+ run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
16
+
17
+ - name : Set up Docker Buildx
18
+ uses : docker/setup-buildx-action@v2
19
+
20
+ - name : Login to ghcr.io
21
+ uses : docker/login-action@v2
22
+ with :
23
+ registry : ghcr.io
24
+ username : ${{ github.actor }}
25
+ password : ${{ secrets.GITHUB_TOKEN }}
26
+
27
+ - name : Docker meta
28
+ id : meta
29
+ uses : docker/metadata-action@v4
30
+ with :
31
+ images : ghcr.io/api7/adc
32
+ tags : |
33
+ type=ref,event=branch
34
+ type=ref,event=pr
35
+ type=match,pattern=portal-api/(.*),group=1
36
+
37
+ - name : Build and push
38
+ uses : docker/build-push-action@v4
39
+ with :
40
+ context : .
41
+ file : libs/tools/src/docker/Dockerfile
42
+ push : ${{ github.event_name == 'push' }}
43
+ tags : ${{ steps.meta.outputs.tags }}
44
+ labels : ${{ steps.meta.outputs.labels }}
45
+ provenance : false
46
+ sbom : false
Original file line number Diff line number Diff line change 5
5
- main
6
6
paths :
7
7
- .github/workflows/update-s3-and-cloudfront.yaml
8
- - s3/install
8
+ - libs/tools/project.json
9
+ - libs/tools/src/s3/install
9
10
10
11
jobs :
11
12
update-s3-and-cloudfront :
@@ -24,16 +25,16 @@ jobs:
24
25
aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
25
26
aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26
27
aws-region : ${{ secrets.S3_BUCKET_REGION }}
27
-
28
+
28
29
- name : Deploy
29
30
# The path to the install script will be /adc/install
30
- run : aws s3 sync ./s3 s3://${{ secrets.S3_BUCKET }}/adc
31
+ run : aws s3 sync ./libs/tools/src/ s3 s3://${{ secrets.S3_BUCKET }}/adc
31
32
32
33
- name : Invalidate CloudFront
33
34
uses : chetan/invalidate-cloudfront-action@v2
34
35
env :
35
36
DISTRIBUTION : ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
36
- PATHS : " / "
37
- AWS_REGION : " ${{ secrets.S3_BUCKET_REGION }}"
37
+ PATHS : ' / '
38
+ AWS_REGION : ' ${{ secrets.S3_BUCKET_REGION }}'
38
39
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
39
40
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " tools" ,
3
+ "$schema" : " ../../node_modules/nx/schemas/project-schema.json" ,
4
+ "sourceRoot" : " libs/tools/src" ,
5
+ "projectType" : " library" ,
6
+ "targets" : {},
7
+ "tags" : []
8
+ }
Original file line number Diff line number Diff line change
1
+ FROM node:bookworm-slim AS builder
2
+
3
+ ENV PNPM_HOME="/pnpm"
4
+ ENV PATH="$PNPM_HOME:$PATH"
5
+ RUN corepack enable
6
+
7
+ WORKDIR /build
8
+
9
+ COPY . .
10
+
11
+ RUN pnpm install nx -g \
12
+ && pnpm install \
13
+ && NODE_ENV=production nx build cli
14
+
15
+ FROM node:bookworm-slim
16
+
17
+ COPY --from=builder /build/dist/apps/cli/main.js .
18
+
19
+ ENTRYPOINT [ "node" , "main.js" ]
File renamed without changes.
Original file line number Diff line number Diff line change 70
70
"yaml" : " ^2.4.2" ,
71
71
"zod" : " ^3.23.8"
72
72
},
73
- "packageManager" : " pnpm@9.12.3 +sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee "
73
+ "packageManager" : " pnpm@9.14.2 +sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387 "
74
74
}
You can’t perform that action at this time.
0 commit comments