Skip to content

Commit

Permalink
revert: gradle cache, docker cache (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
3Juhwan authored Jul 26, 2024
1 parent 1d2e71a commit 8838844
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/backend-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: backend-pull-request

on:
pull_request:
branches: [ "main", "develop", "feature/#121" ]
branches: [ "main", "develop" ]
paths:
- 'server/**'

Expand All @@ -18,24 +18,14 @@ 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:
java-version: '17'
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
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/backend-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: backend-push

on:
push:
branches: [ "main", "develop", "feature/#121" ]
branches: [ "main", "develop" ]
paths:
- 'server/**'

Expand All @@ -25,24 +25,14 @@ 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:
java-version: '17'
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
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ public class HaengdongApplication {

public static void main(String[] args) {
SpringApplication.run(HaengdongApplication.class, args);


}

}

0 comments on commit 8838844

Please sign in to comment.