From 84d975273abb1bf083d7b5fdcb9b28b8a017a7ae Mon Sep 17 00:00:00 2001 From: Peter Jiang <2892084432j@gmail.com> Date: Tue, 18 Jun 2024 22:46:10 -0400 Subject: [PATCH] fix ci please MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ⌘WinKey --- .github/workflows/core-release-docker.yml | 15 +++++++++++++-- .github/workflows/dashboard-release-docker.yml | 13 +++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/core-release-docker.yml b/.github/workflows/core-release-docker.yml index 3bb12367..73fe4880 100644 --- a/.github/workflows/core-release-docker.yml +++ b/.github/workflows/core-release-docker.yml @@ -1,9 +1,20 @@ name: Core - Release Docker + on: release: types: [published] workflow_dispatch: + inputs: + version: + description: "Release tag to download binaries from, must be an existing release" + required: true + type: string + stable: + description: "Is this a stable release?" + required: true + type: boolean + env: REGISTRY: ghcr.io @@ -41,7 +52,7 @@ jobs: regex: true file: "lodestone_core_*" target: release/ - version: "tags/${{ github.event.release.tag_name }}" + version: "tags/${{ inputs.version || github.ref_name }}" token: ${{ secrets.GITHUB_TOKEN }} # https://stackoverflow.com/questions/73402042/github-action-expressions-split-string @@ -53,7 +64,7 @@ jobs: - name: set docker version label env: - LABEL: ${{ !github.event.release.prerelease && 'latest-stable' || 'latest-beta' }} + LABEL: ${{ (inputs.stable || !github.event.release.prerelease) && 'latest-stable' || 'latest-beta' }} id: release_type run: echo "label=${LABEL}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/dashboard-release-docker.yml b/.github/workflows/dashboard-release-docker.yml index c177bec7..cc84ce78 100644 --- a/.github/workflows/dashboard-release-docker.yml +++ b/.github/workflows/dashboard-release-docker.yml @@ -4,6 +4,15 @@ on: release: types: [published] workflow_dispatch: + inputs: + version: + description: "Release tag to download binaries from, must be an existing release" + required: true + type: string + stable: + description: "Is this a stable release?" + required: true + type: boolean env: REGISTRY: ghcr.io @@ -36,7 +45,7 @@ jobs: - name: set docker version label env: - LABEL: ${{ !github.event.release.prerelease && 'latest-stable' || 'latest-beta' }} + LABEL: ${{ (inputs.stable || !github.event.release.prerelease) && 'latest-stable' || 'latest-beta' }} id: release_type run: echo "label=${LABEL}" >> $GITHUB_OUTPUT @@ -50,4 +59,4 @@ jobs: tags: | ${{ steps.string_tag.outputs.lowercase }}:latest ${{ steps.string_tag.outputs.lowercase }}:${{ steps.release_type.outputs.label }} - ${{ steps.string_tag.outputs.lowercase }}:${{ github.event.release.tag_name }} + ${{ steps.string_tag.outputs.lowercase }}:${{ inputs.version || github.event.release.tag_name }}