Skip to content

v0.8.0

v0.8.0 #10

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
release:
types: [published] # prereleased and released
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
- name: Get latest release from Git
id: release-version
run: |
output=$(git ls-remote --refs --sort="version:refname" --tags $repo | cut -d/ -f3-|tail -n1)
echo "release_version=$output" >> $GITHUB_OUTPUT
- name: Build and Push Docker Image (AMD64)
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: devshred/gps-tools-backend
tags: latest, ${{steps.release-version.outputs.release_version}}
registry: docker.io
multiPlatform: false
platform: linux/amd64
dockerfile: src/main/docker/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image (ARM)
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: devshred/gps-tools-backend
tags: latest-arm64, ${{steps.release-version.outputs.release_version}}-arm64
registry: docker.io
multiPlatform: true
platform: linux/arm64,linux/arm64/v8
dockerfile: src/main/docker/Dockerfile.arm
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}