Update Template #49
Workflow file for this run
This file contains 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 Pipeline | |
on: | |
push: | |
branches: [ "main" , "develop" ] | |
tags: [ "v**" ] | |
pull_request: | |
branches: [ "main", "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Gradle | |
uses: gradle/[email protected] | |
with: | |
arguments: build integrationTest bootBuildImage | |
- name: Run sonar analysis with Gradle | |
uses: gradle/[email protected] | |
with: | |
arguments: sonar | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Publish Docker image | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref_type == 'tag' | |
uses: gradle/[email protected] | |
with: | |
arguments: bootBuildImage -PpublishImage | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |