Skip to content

Merge pull request #129 from felipebz/renovate/actions-checkout-7.x #373

Merge pull request #129 from felipebz/renovate/actions-checkout-7.x

Merge pull request #129 from felipebz/renovate/actions-checkout-7.x #373

Workflow file for this run

name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- main
env:
TAG: felipebz/zpa-cli:nightly
jobs:
build:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: liberica
java-version: |
17
25
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
- name: Build with Gradle
run: ./gradlew build --refresh-dependencies
- name: Assemble
run: ./gradlew copyJdksToCache jreleaserAssemble
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
- name: Login to Docker Hub
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
with:
context: .
load: true
tags: ${{ env.TAG }}
- if: github.ref == 'refs/heads/main'
name: Push docker image to Docker Hub
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push: true
tags: ${{ env.TAG }}
- if: github.ref == 'refs/heads/main'
name: Release artifacts
run: ./gradlew jreleaserFullRelease
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
demo:
name: Analyze demo project on SonarCloud
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: utPLSQL/utPLSQL
- name: Login to Docker Hub
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Analyze with zpa-cli
run: |
docker run --rm \
-v $PWD:/src \
felipebz/zpa-cli:nightly \
--sources . \
--output-file zpa-issues.json \
--output-format sq-generic-issue-import
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@ffc3010689be73b8e5ae0c57ce35968afd7909e8 # v5
with:
args: >
-Dsonar.projectKey=utPLSQL-zpa-demo
-Dsonar.organization=felipebz-github
-Dsonar.externalIssuesReportPaths=zpa-issues.json
-Dsonar.pullrequest.provider=
-Dsonar.coverageReportPaths=
-Dsonar.testExecutionReportPaths=
-Dsonar.plsql.file.suffixes=sql,pkg,pks,pkb,fun,pcd,tgg,prc,tpb,trg,typ,tab,tps
-Dsonar.scm.disabled=true
-Dsonar.tests=
env:
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}