Skip to content

Commit

Permalink
build: Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed May 2, 2023
1 parent 52b4772 commit 52fe0aa
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 79 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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@v3

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build --refresh-dependencies

- name: Assemble
uses: gradle/gradle-build-action@v2
with:
arguments: copyJdksToCache jreleaserAssemble

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: ${{ env.TAG }}

- name: Analyze demo project on SonarCloud
run: ./source-test/run-sonar-scanner.sh
env:
SONARCLOUD_ORGANIZATION: ${{ secrets.SONARCLOUD_ORGANIZATION }}
SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}

- if: github.ref == 'refs/heads/main'
name: Push docker image to Docker Hub
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ env.TAG }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ZPA CLI

[![Build Status](https://dev.azure.com/felipebz/z-plsql-analyzer/_apis/build/status/zpa-cli?branchName=main)](https://dev.azure.com/felipebz/z-plsql-analyzer/_build/latest?definitionId=9&branchName=main)
[![Build](https://github.com/felipebz/zpa-cli/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/felipebz/zpa-cli/actions/workflows/build.yml)

This is a command-line interface to the [Z PL/SQL Analyzer](https://github.com/felipebz/zpa). It is a code analyzer for Oracle PL/SQL and Oracle Forms projects.

Expand Down
78 changes: 0 additions & 78 deletions azure-pipelines.yaml

This file was deleted.

0 comments on commit 52fe0aa

Please sign in to comment.