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 }}