Skip to content

Commit 81e7ee5

Browse files
authored
Refactor GitHub Actions workflow for builds and pushes
Updated CI/CD workflow to include build-and-push job and modified build steps.
1 parent 85c85a2 commit 81e7ee5

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/dev-cd.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- "**"
88

99
jobs:
10-
build:
10+
build-and-push:
1111
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout source
@@ -21,16 +21,11 @@ jobs:
2121

2222
- name: Setup Gradle
2323
uses: gradle/actions/setup-gradle@v3
24+
with:
25+
cache-read-only: false
2426

2527
- name: Build project
26-
run: ./gradlew bootJar
27-
28-
push:
29-
needs: build
30-
runs-on: ubuntu-24.04
31-
steps:
32-
- name: Checkout source
33-
uses: actions/checkout@v4
28+
run: ./gradlew clean bootJar
3429

3530
- name: Login to Docker Hub
3631
uses: docker/login-action@v3
@@ -49,7 +44,7 @@ jobs:
4944
${{ secrets.DOCKERHUB_USERNAME }}/crew-wiki:${{ github.sha }}
5045
5146
deploy:
52-
needs: push
47+
needs: build-and-push
5348
runs-on: ubuntu-24.04
5449
steps:
5550
- name: Deploy to Server

0 commit comments

Comments
 (0)