From 883884427ff87f4325acd2c5cf7e84be57adf291 Mon Sep 17 00:00:00 2001 From: Juhwan Kim <13selfesteem91@naver.com> Date: Fri, 26 Jul 2024 13:44:42 +0900 Subject: [PATCH] revert: gradle cache, docker cache (#133) --- .github/workflows/backend-pull-request.yml | 14 ++----------- .github/workflows/backend-push.yml | 21 +++++-------------- .../haengdong/HaengdongApplication.java | 4 +--- 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/.github/workflows/backend-pull-request.yml b/.github/workflows/backend-pull-request.yml index ba6870a61..113972929 100644 --- a/.github/workflows/backend-pull-request.yml +++ b/.github/workflows/backend-pull-request.yml @@ -2,7 +2,7 @@ name: backend-pull-request on: pull_request: - branches: [ "main", "develop", "feature/#121" ] + branches: [ "main", "develop" ] paths: - 'server/**' @@ -18,16 +18,6 @@ jobs: - name: CheckOut uses: actions/checkout@v4 - - name: Gradle Caching - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -35,7 +25,7 @@ jobs: distribution: 'temurin' - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - name: Test with Gradle Wrapper run: ./gradlew clean build diff --git a/.github/workflows/backend-push.yml b/.github/workflows/backend-push.yml index 0a3b3e43f..a35eaea7b 100644 --- a/.github/workflows/backend-push.yml +++ b/.github/workflows/backend-push.yml @@ -2,7 +2,7 @@ name: backend-push on: push: - branches: [ "main", "develop", "feature/#121" ] + branches: [ "main", "develop" ] paths: - 'server/**' @@ -25,16 +25,6 @@ jobs: token: ${{secrets.CONFIG_SUBMODULE_TOKEN}} submodules: true - - name: Gradle Caching - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -42,7 +32,7 @@ jobs: distribution: 'temurin' - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - name: Test with Gradle Wrapper run: ./gradlew test @@ -58,9 +48,8 @@ jobs: - name: Build and push run: | - docker buildx build --platform linux/arm64 --cache-from=type=registry,ref=${{ secrets.DOCKER_USERNAME }}/haengdong-backend-dev:cache \ - --cache-to=type=registry,ref=${{ secrets.DOCKER_USERNAME }}/haengdong-backend-dev:cache,mode=max \ - -t ${{ secrets.DOCKER_USERNAME }}/haengdong-backend-dev --push . + docker buildx build --platform linux/arm64 -t \ + ${{ secrets.DOCKER_USERNAME }}/haengdong-backend-dev --push . deploy: needs: build @@ -79,4 +68,4 @@ jobs: run: sudo docker pull ${{ secrets.DOCKER_USERNAME }}/haengdong-backend-dev - name: Docker run - run: sudo docker run -d -p 8080:8080 --name haengdong-backend-dev haengdong/haengdong-backend-dev + run: sudo docker run -d -p 80:8080 --name haengdong-backend-dev haengdong/haengdong-backend-dev diff --git a/server/src/main/java/server/haengdong/HaengdongApplication.java b/server/src/main/java/server/haengdong/HaengdongApplication.java index be22f61d0..31b6e46e7 100644 --- a/server/src/main/java/server/haengdong/HaengdongApplication.java +++ b/server/src/main/java/server/haengdong/HaengdongApplication.java @@ -8,8 +8,6 @@ public class HaengdongApplication { public static void main(String[] args) { SpringApplication.run(HaengdongApplication.class, args); - - } - + }