Skip to content

Merge pull request #41 from campos20/feature/email-to-in-categories #9

Merge pull request #41 from campos20/feature/email-to-in-categories

Merge pull request #41 from campos20/feature/email-to-in-categories #9

Workflow file for this run

name: Deploy docker image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore gradle dependencies
uses: actions/cache@v2
with:
path: "~/.gradle"
key: ${{ runner.os }}-modules-${{ hashFiles('build.gradle') }}
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build jar
run: ./gradlew build -x test
- name: Push docker image
run: |
# Docker login
docker login -u="${{ secrets.DOCKER_HUB_USERNAME }}" -p="${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}"
GIT_HASH=$(git rev-parse --short HEAD)
docker build -t thewca/db-sanity-check:latest -t thewca/db-sanity-check:$GIT_HASH .
docker push thewca/db-sanity-check --all-tags