Skip to content

[PAT-2271] Docker tw-base-java base image security update #42

[PAT-2271] Docker tw-base-java base image security update

[PAT-2271] Docker tw-base-java base image security update #42

name: Build, Test & Upload Library
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:10.9
env:
POSTGRES_DB: idempotence4j_db
POSTGRES_USER: username
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mariadb:
image: mariadb:10.3.13
env:
MYSQL_DATABASE: idempotence4j_db
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: username
MYSQL_PASSWORD: password
ports:
- 3306:3306
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 1.13
uses: actions/setup-java@v1
with:
java-version: 1.13
server-id: github
settings-path: ${{ github.workspace }}
- name: Build with Gradle
run: ./gradlew build
- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/master'
run: ./gradlew publish
env:
MAVEN_URL: https://maven.pkg.github.com/transferwise/idempotence4j
MAVEN_USER: ${{ github.actor }}
MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}