Skip to content

Commit

Permalink
Switch to common gradle template
Browse files Browse the repository at this point in the history
  • Loading branch information
octopusden authored May 31, 2023
1 parent 5c6c819 commit 7b390be
Showing 1 changed file with 7 additions and 35 deletions.
42 changes: 7 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
name: Build
name: Gradle Build & UT

on:
pull_request:
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
environment: Prod
steps:
- uses: actions/checkout@v3
name: Checkout(switching to commit)
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- uses: actions-ecosystem/action-get-latest-tag@v1
id: tag_version
with:
initial_version: v2.0.0
- uses: actions-ecosystem/action-bump-semver@v1
id: bump_semver
with:
current_version: ${{ steps.tag_version.outputs.tag }}
level: patch
- run: |
echo "BUILD_VERSION: ${{ steps.bump_semver.outputs.new_version }}"
- uses: octopusden/octopus-base/.github/actions/get-version@main
name: Get version
id: version
with:
tag-value: ${{ steps.bump_semver.outputs.new_version }}
exit-if-empty: true
- name: Build with Gradle
run: ./gradlew build dockerBuildImage -x test -Ppublishing.docker.registry=ghcr.io/octopusden -Pdocker.registry=docker.io -PbuildVersion=${{ steps.version.outputs.version }} -Pversion=${{ steps.version.outputs.version }}
uses: octopusden/octopus-base/.github/workflows/common-java-gradle-build.yml@gradle-templates
with:
java-version: "11"
docker-image: config-service
flow-type: public

0 comments on commit 7b390be

Please sign in to comment.