Skip to content

Feat: change buildx to version6 #5

Feat: change buildx to version6

Feat: change buildx to version6 #5

Workflow file for this run

name: MeMe CI/CD
on:
push:
branches: ["develop", "main", "feat/#24"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: "adopt"
# MEME-AUTH 모듈 빌드
- name: Build MEME-AUTH with Gradle
run: |
cd MEME-AUTH
chmod +x ./gradlew
./gradlew clean build
- name: Log in to Docker Hub
run: echo "${{ vars.DOCKER_PASSWORD }}" | docker login -u "${{ vars.DOCKER_USERNAME }}" --password-stdin
- 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/amd64,linux/arm64
# MEME-RESERVATION 모듈 빌드
- name: Build MEME-RESERVATION with Gradle
run: |
cd MEME-RESERVATION
chmod +x ./gradlew
./gradlew clean build
- name: Build and push Docker image for MEME-RESERVATION
uses: docker/build-push-action@v5
with:
context: ./MEME-RESERVATION # MEME-RESERVATION 모듈의 경로
push: true
tags: ${{ vars.DOCKER_USERNAME }}/${{ vars.MEME_RESERVATION }}:latest
platforms: linux/amd64,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 스크립트 실행
bash /home/sunwupark/Downloads/MeMe/meme-bash.sh
EOF