Skip to content

Commit cc7a538

Browse files
committed
enable release of old versions
enables manual_dispatch of old versions without overwriting 'latest' tag
1 parent 4256312 commit cc7a538

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/octoprint-release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@v2
3838
- name: Get Tag if push
39-
id: get-octoprint-release
40-
if: ${{ github.event_name == 'push'}}
39+
id: latest-octoprint
4140
uses: pozetroninc/github-action-get-latest-release@master
4241
with:
4342
owner: OctoPrint
4443
repo: OctoPrint
4544
- name: Set Tag on Push
4645
if: ${{ github.event_name == 'push'}}
47-
run: echo "::set-env name=tag_name::${{ steps.get-octoprint-release.outputs.release }}"
46+
run: echo "::set-env name=tag_name::${{ steps.latest-octoprint.outputs.release }}"
4847
- name: Set Tag on dispatch
4948
if: ${{ github.event_name == 'repository_dispatch' }}
5049
run: echo "::set-env name=tag_name::${{ github.event.client_payload.tag_name }}"
@@ -69,6 +68,9 @@ jobs:
6968
7069
- name: Build and Deploy
7170
id: build_deploy
71+
#if matrix tag is latest AND tag_name is NOT equal to latest-octoprint don't build
72+
# this allows rebuilds of older versions without changing 'latest' to an old release
73+
if: !(env.tag_name == 'latest' && ( steps.latest-octprint.outputs.release != env.tag_name ))
7274
run: |
7375
docker buildx build --push \
7476
--platform linux/arm64,linux/amd64,linux/arm/v7 \

0 commit comments

Comments
 (0)