Skip to content

Commit

Permalink
:fix docker.yml using this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwupark committed May 20, 2024
1 parent 69b8648 commit 5ed310a
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: main Workflow
on:
push:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,21 +21,32 @@ jobs:
mkdir -p src/main/resources
echo "${{ secrets.MAIN_DATABASE_YML }}" | base64 --decode > src/main/resources/application.yml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew clean build --exclude-task test

- name: Login to Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

## 웹 이미지 빌드 및 도커허브에 push
- name: web docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_REPO }}/meme-service .
docker push ${{ secrets.DOCKER_REPO }}/meme-service
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: sunwupark/meme-service:latest
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
- name: EC2 docker remove
uses: appleboy/[email protected]
Expand Down

0 comments on commit 5ed310a

Please sign in to comment.