Skip to content

fix: Fixed Builder pattern ignoring initialization of OneToMany varia… #37

fix: Fixed Builder pattern ignoring initialization of OneToMany varia…

fix: Fixed Builder pattern ignoring initialization of OneToMany varia… #37

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Copy application.properties and gcp cloud storage key into runner
run: |
mkdir -p ./src/main/resources
touch ./src/main/resources/application.properties
echo "${{secrets.APPLICATION_YML}}" > ./src/main/resources/application.properties
- name: create-json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "googlecloudstoragekey.json"
json: ${{ secrets.GCS_JSON_KEY}}
dir: 'src/main/resources/'
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build
- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: Build Docker
run: |
docker build -t ghcr.io/${{ secrets.GHCR_USERNAME }}/ssock:latest .
- name: Push Docker
run: docker push ghcr.io/${{ secrets.GHCR_USERNAME }}/ssock:latest
deploy:
runs-on: ubuntu-latest
permissions: write-all
needs: build
steps:
- uses: actions/checkout@v4
- name: Copy docker-compose into instance
uses: appleboy/scp-action@master
with:
host: ${{ secrets.GCP_HOST }}
username: ${{ secrets.GCP_USERNAME }}
key: ${{ secrets.GCP_PRIVATEKEY }}
source: "./docker-compose.yml"
target: "/home/${{ secrets.GCP_USERNAME }}"
overwrite: true
debug: true
- name: Deploy to Instance
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.GCP_HOST }}
username: ${{ secrets.GCP_USERNAME }}
key: ${{ secrets.GCP_PRIVATEKEY }}
script: |
echo ${{ secrets.GHCR_PASSWORD }} | sudo docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
sudo docker pull ghcr.io/${{ secrets.GHCR_USERNAME }}/ssock:latest
sudo docker rm -f $(sudo docker ps -qa) || true
cd /home/${{ secrets.GCP_USERNAME }}
sudo docker-compose up -d
sudo docker image prune -f