-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (55 loc) · 1.78 KB
/
gradle-build-develop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Gradle Build & Deploy - Develop
on:
push:
branches:
- 'develop'
- 'feature-**/*'
- 'bugfix-**/*'
- 'chore-**/*'
- 'doc-**/*'
- 'hotfix-**/*'
- 'dependabot/**/*'
jobs:
build-and-test:
runs-on: ubuntu-latest
environment:
name: Development
url: https://checkins-develop-tuvcfzotpq-uc.a.run.app/
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: 21
- name: Cache SonarQube packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: '🐳 Validate Gradle Wrapper'
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: '🐳 Gradle run tests'
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: check
deploy:
runs-on: ubuntu-latest
needs: [build-and-test]
if: github.ref == 'refs/heads/develop' || github.ref == 'feature-2532/graal'
steps:
- name: '🚀 Deploy Image to Cloud Run'
uses: './.github/workflows/gradle-deploy-develop.yml'