workflow release

- add publish-artifact.yml
- add docker-image.yml
- add release.yml
This commit is contained in:
2025-04-10 08:45:36 +02:00
committed by swordsteel
parent 931f09fb80
commit 51d4e31de3
3 changed files with 250 additions and 0 deletions

64
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Docker Image
on:
workflow_call:
inputs:
JAVA_VERSION:
description: Java version to use
required: false
type: string
default: '17'
PROJECT_NAME:
description: Project name
required: true
type: string
PROJECT_VERSION:
description: Release version
required: true
type: string
secrets:
CI_BOT_PAT:
required: true
env:
REPOSITORY_USER: ${{ vars.CI_BOT_USERNAME }}
REPOSITORY_TOKEN: ${{ secrets.CI_BOT_PAT }}
jobs:
docker-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "v${{ inputs.PROJECT_VERSION }}"
token: ${{ secrets.CI_BOT_PAT }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ inputs.JAVA_VERSION }}
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew dockerCreateDockerfile
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ vars.CI_BOT_USERNAME }}
password: ${{ secrets.CI_BOT_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: ./build/docker/
platforms: linux/amd64
provenance: false
push: true
sbom: false
tags: ghcr.io/${{ github.repository_owner }}/${{ inputs.PROJECT_NAME }}:${{ inputs.PROJECT_VERSION }},ghcr.io/${{ github.repository_owner }}/${{ inputs.PROJECT_NAME }}:latest