Skip to content

AUT-1670 Rename GOVSSO-Mock to GovSSO-Mock #48

AUT-1670 Rename GOVSSO-Mock to GovSSO-Mock

AUT-1670 Rename GOVSSO-Mock to GovSSO-Mock #48

Workflow file for this run

name: Build and push Docker image
on:
push:
branches:
- develop
tags:
- v[0-9]+.[0-9]+.[0-9]+
env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/tara-govsso-exampleclient
jobs:
build:
name: Build
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: temurin
cache: maven
- name: Build
# TODO (AUT-1470): Run tests
run: mvn --batch-mode --update-snapshots -Dspring-boot.build-image.imageName=$IMAGE_NAME -DskipTests dependency:tree spring-boot:build-image
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag and push Docker image
# Docker tag will have the same name as Git branch/tag, but without the preceding "v" in case of a tag
run: |
docker_tag=$(echo "$GITHUB_REF" | sed 's|.*/v\?||')
docker tag $IMAGE_NAME $IMAGE_NAME:$docker_tag
docker push $IMAGE_NAME:$docker_tag