Unify scripts #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gradle Build & Deploy - Develop | |
on: | |
push: | |
branches: | |
- 'develop' | |
- 'feature-**/*' | |
- 'bugfix-**/*' | |
- 'chore-**/*' | |
- 'doc-**/*' | |
- 'hotfix-**/*' | |
- 'dependabot/**/*' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'π Checkout' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 'π Set up Node LTS' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: 'βοΈ Set up GraalVM 21' | |
uses: graalvm/[email protected] | |
with: | |
distribution: 'graalvm' | |
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 nativeTest | |
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' | |
deploy-native: | |
runs-on: ubuntu-latest | |
needs: [build-and-test] | |
if: github.ref == 'refs/heads/develop' || github.ref == 'feature-2532/graal' | |
steps: | |
- name: 'π Deploy Native Image to Cloud Run' | |
uses: './.github/workflows/gradle-deploy-native-develop.yml' | |
finalize: | |
runs-on: ubuntu-latest | |
needs: [deploy, deploy-native] | |
if: always() && !failure() && !cancelled() | |
steps: | |
- name: 'β Finalize Deployment' | |
run: echo "Deployment of develop branch completed successfully." |