Skip to content

release-maven-image #17

release-maven-image

release-maven-image #17

name: release-maven-image
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Default version to use when preparing a release."
required: true
default: "X.Y.Z"
developmentVersion:
description: "Default version to use for new local working copy."
required: true
default: "X.Y.Z-SNAPSHOT"
app-path:
type: choice
description: Service-Name
required: true
options:
- sps-backend # todo: muss angepasst werden. eigenen Ordner verwenden
- sps-frontend # todo: muss angepasst werden. eigenen Ordner verwenden
jobs:
release-maven:
runs-on: ubuntu-latest
outputs:
MVN_ARTIFACT_ID: ${{ steps.maven-release-step.outputs.MVN_ARTIFACT_ID }}
ARTIFACT_NAME: ${{ steps.artifact-name.outputs.artifact-name }}
env:
TZ: Europe/Berlin # timezone
steps:
- id: maven-release-step
uses: it-at-m/.github/.github/actions/action-maven-release@main
with:
app-path: "/${{ github.event.inputs.app-path }}"
releaseVersion: "${{ github.event.inputs.releaseVersion }}"
developmentVersion: "${{ github.event.inputs.developmentVersion }}"
java-version: 17
build-image:
runs-on: ubuntu-latest
needs: release-maven
steps:
- uses: it-at-m/.github/.github/actions/action-build-image@main
with:
path: "${{ github.event.inputs.app-path }}"
image-name: "${{ github.event.inputs.app-path }}"
registry-password: ${{ secrets.GITHUB_TOKEN }}
artifact-name: ${{ needs.release-maven.outputs.ARTIFACT_NAME }}
registry: ghcr.io
registry-username: ${{ github.actor }}
image-tags: |
type=semver,pattern={{version}},value=${{ github.event.inputs.releaseVersion }}
create-github-release:
needs: release-maven
runs-on: ubuntu-latest
steps:
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{needs.release-maven.outputs.MVN_ARTIFACT_ID}}-${{ github.event.inputs.releaseVersion }}
draft: false
prerelease: false
generate_release_notes: false