Skip to content

Release

Release #80

Workflow file for this run

# This file was generated using Kotlin DSL (.github/workflows/release.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'Release'
on:
release: {}
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/release.yaml'' && ''.github/workflows/release.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/release.yaml'''
Release:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Setup JDK'
uses: 'actions/setup-java@v4'
with:
java-version: '17'
distribution: 'adopt'
- id: 'step-1'
name: 'Checkout'
uses: 'actions/checkout@v4'
- id: 'step-2'
name: 'Create ShadowJar'
uses: 'gradle/gradle-build-action@v2'
with:
arguments: ':bootJar'
- id: 'step-3'
name: 'Login to DockerHub'
uses: 'Azure/docker-login@v1'
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_TOKEN }}'
- id: 'step-4'
name: 'Build and Push'
uses: 'docker/build-push-action@v5'
with:
context: '.'
push: 'true'
tags: |-
jopiterapp/jopiter-backend:latest
jopiterapp/jopiter-backend:${{ github.ref }}