File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Backend
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ publish_backend :
8+ name : Generate docker image and publish
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check out code
12+ uses : actions/checkout@v4
13+ - name : Set up JDK 21
14+ uses : actions/setup-java@v4
15+ with :
16+ distribution : adopt
17+ java-version : ' 21'
18+ - name : Release build
19+ run : ./gradlew :backend:gateway:buildFatJar
20+ - name : Log in to GitHub Container Registry
21+ uses : docker/login-action@v3
22+ with :
23+ registry : ghcr.io
24+ username : ${{ github.actor }}
25+ password : ${{ secrets.GITHUB_TOKEN }}
26+ - name : Build and push Docker image
27+ uses : docker/build-push-action@v5
28+ with :
29+ context : ./Writeopia/backend/gateway
30+ push : true
31+ tags : ghcr.io/${{ github.repository_owner }}/writeopia-backend:latest
Original file line number Diff line number Diff line change 1+ FROM openjdk:21
2+
3+ COPY ./build/libs/gateway-all.jar gateway-all.jar
4+ EXPOSE 8080
5+ ENTRYPOINT ["java" , "-jar" , "gateway-all.jar" ]
You can’t perform that action at this time.
0 commit comments