File tree Expand file tree Collapse file tree 5 files changed +56
-11
lines changed
Expand file tree Collapse file tree 5 files changed +56
-11
lines changed Original file line number Diff line number Diff line change 4040 runs-on : ubuntu-latest
4141 needs : test
4242 if : github.ref == 'refs/heads/prod'
43+ permissions :
44+ contents : read
45+ packages : write
46+ attestations : write
47+ id-token : write
4348 steps :
4449 - name : Checkout repository
4550 uses : actions/checkout@v4
5055 - name : Build project and generate docker file
5156 run : ./gradlew botfest:createDockerfile
5257
58+ - name : Login to GitHub Container Registry
59+ uses : docker/login-action@v3
60+ with :
61+ registry : ghcr.io
62+ username : ${{ github.repository_owner }}
63+ password : ${{ secrets.GITHUB_TOKEN }}
64+
65+ - name : Docker meta
66+ id : meta
67+ uses : docker/metadata-action@v5
68+
5369 - name : Build and push docker image
5470 uses : docker/build-push-action@v6
5571 with :
5672 context : " botfest/build"
5773 push : true
58- tags : modfest/botfest:latest
74+ tags : ghcr.io/modfest/botfest:latest
75+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1717 publish :
1818 runs-on : ubuntu-latest
1919 if : github.ref == 'refs/heads/prod'
20+ permissions :
21+ contents : read
22+ packages : write
23+ attestations : write
24+ id-token : write
2025 steps :
2126 - name : Checkout repository
2227 uses : actions/checkout@v4
@@ -28,10 +33,15 @@ jobs:
2833 username : ${{ github.repository_owner }}
2934 password : ${{ secrets.GITHUB_TOKEN }}
3035
36+ - name : Docker meta
37+ id : meta
38+ uses : docker/metadata-action@v5
39+
3140 - name : Build and push docker image
3241 uses : docker/build-push-action@v6
3342 with :
3443 context : " ."
3544 file : " panel/Dockerfile"
3645 push : true
37- tags : modfest/platform_api:latest
46+ tags : ghcr.io/modfest/panel:latest
47+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 4040 runs-on : ubuntu-latest
4141 needs : test
4242 if : github.ref == 'refs/heads/prod'
43+ permissions :
44+ contents : read
45+ packages : write
46+ attestations : write
47+ id-token : write
4348 steps :
4449 - name : Checkout repository
4550 uses : actions/checkout@v4
5055 - name : Build project and generate docker file
5156 run : ./gradlew platform_api:createDockerfile
5257
58+ - name : Login to GitHub Container Registry
59+ uses : docker/login-action@v3
60+ with :
61+ registry : ghcr.io
62+ username : ${{ github.repository_owner }}
63+ password : ${{ secrets.GITHUB_TOKEN }}
64+
65+ - name : Docker meta
66+ id : meta
67+ uses : docker/metadata-action@v5
68+
5369 - name : Build and push docker image
5470 uses : docker/build-push-action@v6
5571 with :
5672 context : " platform_api/build"
5773 push : true
58- tags : modfest/platform_api:latest
74+ tags : ghcr.io/modfest/platform_api:latest
75+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ ENV NODE_ENV=production
4242RUN addgroup --system --gid 1001 nodejs
4343RUN adduser --system --uid 1001 nextjs
4444
45- COPY --from=builder /app/panel/public ./public
46-
4745# Automatically leverage output traces to reduce image size
4846# https://nextjs.org/docs/advanced-features/output-file-tracing
4947COPY --from=builder --chown=nextjs:nodejs /app/panel/.next/standalone ./
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ tasks.bootRun {
9393 )
9494}
9595
96- tasks.createDockerfile { dependsOn(" bootBuildImage " ) }
96+ tasks.createDockerfile { dependsOn(" bootJar " ) }
9797docker {
9898 generateOnBuild = false
9999
@@ -113,15 +113,18 @@ docker {
113113
114114 workdir(" /app" )
115115
116- val filename = tasks.bootBuildImage .get().archiveFile.get()
116+ val filename = tasks.bootJar .get().archiveFile.get()
117117 .asFile.relativeTo(dockerfileLocation.parentFile)
118118 copy(" $filename " , " /app/app.jar" )
119119
120- runShell(" mkdir -p /var/lib/platform /data" )
120+ runShell(" mkdir -p /app /data" )
121121
122- env {
123- add(" SERVER_PORT" , " 8080" )
124- }
122+ add(object : DockerfileCommand () {
123+ override val keyword: String
124+ get() = " ENV"
125+
126+ override fun toString (): String = " ENV SERVER_PORT=8080 PLATFORM_DATADIR=/app/data"
127+ })
125128
126129 expose(8080 )
127130 entryPointExec(
You can’t perform that action at this time.
0 commit comments