Skip to content

Commit

Permalink
Add GH Action
Browse files Browse the repository at this point in the history
  • Loading branch information
tilanis committed Jul 22, 2021
1 parent ade4a7a commit 1a436c8
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI
on:
pull_request:
push:
branches:
- master
release:
types:
- released

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JVM
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '12'
- name: Check
run: ./gradlew check

deploy:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JVM
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '12'
- name: Build
run: ./gradlew build
- name: Get release or tag
uses: tenhaus/get-release-or-tag@v2
id: tag
- name: Build Docker image and push to Docker Hub
env:
IMAGE_TAG: ${{ steps.tag.outputs.tag }}
run: ./gradlew dockerPush

0 comments on commit 1a436c8

Please sign in to comment.