Feat: re run without jdeps #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MeMe CI/CD | |
on: | |
push: | |
branches: ['feat/#63'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: "adopt" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ vars.DOCKER_PASSWORD }} | |
# MEME-AUTH 모듈 빌드 | |
- name: Build MEME-AUTH with Gradle | |
run: | | |
cd MEME-AUTH | |
chmod +x ./gradlew | |
./gradlew clean build -x test | |
- name: Build and push Docker image for MEME-AUTH | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./MEME-AUTH # MEME-AUTH 모듈의 경로 | |
push: true | |
tags: ${{ vars.DOCKER_USERNAME }}/${{ vars.MEME_AUTH }}:latest | |
platforms: linux/arm64 | |
# MEME-RESERVATION 모듈 빌드 | |
- name: Build MEME-RESERVATION with Gradle | |
run: | | |
cd MEME-RESERVATION | |
chmod +x ./gradlew | |
./gradlew clean build -x test | |
- name: Build and push Docker image for MEME-RESERVATION | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./MEME-RESERVATION # MEME-RESERVATION 모듈의 경로 | |
push: true | |
tags: ${{ vars.DOCKER_USERNAME }}/${{ vars.MEME_RESERVATION }}:latest | |
platforms: linux/arm64 | |
# MEME-RESERVATION 모듈 빌드 | |
- name: Build MEME-SERVICE with Gradle | |
run: | | |
cd MEME-SERVICE | |
chmod +x ./gradlew | |
./gradlew clean build -x test | |
- name: Build and push Docker image for MEME-SERVICE | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./MEME-SERVICE # MEME-RESERVATION 모듈의 경로 | |
push: true | |
tags: ${{ vars.DOCKER_USERNAME }}/${{ vars.MEME_SERVICE }}:latest | |
platforms: linux/arm64 | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Install SSH client | |
run: sudo apt-get install -y sshpass | |
- name: Trigger Docker update script on Raspberry Pi | |
run: | | |
sshpass -p ${{ vars.PI_PASSWORD }} ssh -o StrictHostKeyChecking=no ${{ vars.PI_USER }}@${{ vars.PI_HOST }} << EOF | |
echo "Connected to Raspberry Pi" | |
# meme-bash.sh 스크립트 실행을 백그라운드에서 실행 | |
cd /home/sunwupark/Downloads/MeMe | |
chmod +x meme-bash.sh | |
nohup ./meme-bash.sh > /dev/null 2>&1 & | |
EOF |