From c6c2f19d60754d2ad98f5f9da0a0e93cf5d2f6de Mon Sep 17 00:00:00 2001 From: Andreas <58698758+holzi1005@users.noreply.github.com> Date: Sat, 5 Sep 2026 14:51:16 +0200 Subject: [PATCH] Revert "update" --- .github/workflows/release.yml | 35 +++------------------------ .github/workflows/task-release.yml | 22 +++++++++++++++++ .github/workflows/task-version.yml | 39 ++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/task-release.yml create mode 100644 .github/workflows/task-version.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88444bb..6807163 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,47 +10,18 @@ on: jobs: version: - runs-on: ubuntu-latest - outputs: - version: ${{ steps.version.outputs.version }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Compute tag - id: version - uses: h2-invent/action-compute-tag@v2.2.0 - with: - event-name: ${{ github.event_name }} - base-ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.event.pull_request.base.ref }} - pr-action: ${{ github.event.action }} - pr-merged: ${{ github.event.pull_request.merged }} - - - name: Create new Release with semantic-version tag - uses: ncipollo/release-action@v1 - id: create_release - with: - draft: false - prerelease: false - allowUpdates: true - name: Release ${{ steps.version.outputs.version }} - tag: ${{ steps.version.outputs.version }} - bodyFile: RELEASE_NOTE.md + uses: ./.github/workflows/task-version.yml docker_image: needs: - version uses: ./.github/workflows/task-docker.yml - if: needs.version.outputs.skip != 'true' with: registry: reg.h2-invent.com dockerfile_path: './Dockerfile' directory: '.' - version: ${{ needs.version.outputs.version }} - tags: reg.h2-invent.com/filemanager/core:${{ needs.version.outputs.version }},reg.h2-invent.com/filemanager/core:latest + version: ${{ needs.version.outputs.version_output }} + tags: reg.h2-invent.com/filemanager/core:${{ needs.version.outputs.version_output }},reg.h2-invent.com/filemanager/core:latest secrets: docker_password: ${{ secrets.HARBOR_PUSH_PASSWORD }} docker_username: ${{ secrets.HARBOR_PUSH_USERNAME }} - diff --git a/.github/workflows/task-release.yml b/.github/workflows/task-release.yml new file mode 100644 index 0000000..a4ae7fa --- /dev/null +++ b/.github/workflows/task-release.yml @@ -0,0 +1,22 @@ +name: Release Version + +on: + workflow_call: + inputs: + version: + description: 'release version' + default: true + type: string +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Create new Release with semantic-version tag + uses: ncipollo/release-action@v1 + with: + draft: false + prerelease: false + allowUpdates: true + name: Release ${{ inputs.version }} + tag: ${{ inputs.version }} + bodyFile: RELEASE_NOTE.md diff --git a/.github/workflows/task-version.yml b/.github/workflows/task-version.yml new file mode 100644 index 0000000..0b25dc9 --- /dev/null +++ b/.github/workflows/task-version.yml @@ -0,0 +1,39 @@ +name: Publish Docker image + +on: + workflow_call: + outputs: + version_output: + description: Output next build version + value: ${{ jobs.detect_version.outputs.version }} +jobs: + detect_version: + name: Generate new Release Version + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - name: Check out the repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: paulhatch/semantic-version@v5.0.2 + id: version + with: + tag_prefix: "" + major_pattern: "(MAJOR)" + minor_pattern: "(MINOR)" + change_path: . + version_format: "${major}.${minor}.${patch}" + + - name: Create new Release with semantic-version tag + uses: ncipollo/release-action@v1 + id: create_release + with: + draft: false + prerelease: false + allowUpdates: true + name: Release ${{ steps.version.outputs.version }} + tag: ${{ steps.version.outputs.version }} + bodyFile: RELEASE_NOTE.md