Skip to content

Commit 44a4e63

Browse files
authored
Update cd.yml
1 parent 7ff9b7f commit 44a4e63

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

.github/workflows/cd.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
name: Deploy to GCP
22

33
on:
4-
workflow_run:
5-
workflows: ["ci"] # CI 워크플로우 이름
6-
types:
7-
- completed
4+
push:
85
branches:
96
- main
7+
paths-ignore:
8+
- '.github/workflows/**'
109
workflow_dispatch:
1110

1211
jobs:
1312
deploy:
14-
if: >
15-
${{ github.event.workflow_run.event == 'pull_request' &&
16-
github.event.workflow_run.conclusion == 'success' }}
1713
runs-on: ubuntu-latest
1814
permissions:
1915
id-token: write
2016
contents: read
2117
steps:
2218
- uses: actions/checkout@v4
2319

24-
# CI에서 생성한 JAR 파일 다운로드
25-
- name: Download JAR Artifact
26-
uses: actions/download-artifact@v4
20+
- name: Set up JDK 21
21+
uses: actions/setup-java@v4
2722
with:
28-
name: application-jar
29-
path: build/libs/
23+
java-version: '21'
24+
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v4
28+
29+
- name: Build with Gradle
30+
run: ./gradlew build
3031

3132
- name: Login to DockerHub
3233
uses: docker/login-action@v3

0 commit comments

Comments
 (0)