Skip to content

Commit

Permalink
Merge pull request #11 from team-xquare/rudeh2926-patch-1
Browse files Browse the repository at this point in the history
Create git-action.yml
  • Loading branch information
rudeh2926 authored Feb 10, 2024
2 parents f0de145 + 6cce65c commit 46fa9f6
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/git-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: gradle-backoffice

on:
push:
branches: [ "main" ]

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379

steps:
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'

- name: Build Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: |
build
--build-cache
--no-daemon
- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: prod
access_key: ${{ secrets.XQUARE_ACCESS_KEY }}
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
buildargs: |
PROFILE=prod
5 changes: 5 additions & 0 deletions .xquare/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config:
name: xquare-backoffice
prefix: "/xquare-backoffice
service_type: be
port: 8080
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM openjdk:17-jdk

ARG PROFILE
ENV PROFILE ${PROFILE}

ARG JAR_FILE=./build/libs/*.jar
COPY ${JAR_FILE} application.jar

EXPOSE 8080
ENTRYPOINT ["java", "-jar", "application.jar"]

0 comments on commit 46fa9f6

Please sign in to comment.