Skip to content

#17 - implements pagination support #14

#17 - implements pagination support

#17 - implements pagination support #14

Workflow file for this run

name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Build for push
run: mvn -B package
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Building and publish Docker Image
run: |
IMAGE_NAME=${{ secrets.DOCKER_USERNAME }}/${{ secrets.APP_NAME }}
TAG=`if [ "${{ env.GITHUB_REF_SLUG }}" == "master" ]; then echo "latest"; else echo ${{ env.GITHUB_REF_SLUG }}; fi`
docker build -t $IMAGE_NAME:${{ env.GITHUB_SHA_SHORT }} -t $IMAGE_NAME:$TAG --build-arg JAR_FILE=target/${{ secrets.APP_NAME }}.jar .
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push $IMAGE_NAME --all-tags