66 release :
77 types :
88 - published
9+ workflow_dispatch :
10+ inputs :
11+ release_tag :
12+ description : Existing release tag to publish.
13+ required : true
14+ type : string
915
1016concurrency :
11- group : ${{ github.workflow }}-${{ github.event.release.tag_name }}
17+ group : ${{ github.workflow }}-${{ github.event.release.tag_name || inputs.release_tag }}
1218 cancel-in-progress : true
1319
1420env :
1723 image_path : images/homelab-workspace
1824 template_path : templates/kubernetes/homelab-workspace
1925 template_name : homelab-workspace
20- source_ref : ${{ github.event.release.tag_name }}
21- source_sha : ${{ github.event.release.tag_name }}
26+ source_ref : ${{ github.event.release.tag_name || inputs.release_tag }}
27+ source_sha : ${{ github.event.release.tag_name || inputs.release_tag }}
2228
2329jobs :
2430 publish-image :
3339 platforms : linux/amd64,linux/arm64
3440 private_registry_repository : ${{ vars.CONTAINER_REGISTRY_PATH }}/coder-workspace
3541 private_registry_build_cache : ${{ vars.CONTAINER_REGISTRY_CACHE_PATH }}/coder-workspace
36- git_ref : ${{ github.event.release.tag_name }}
42+ git_ref : ${{ github.event.release.tag_name || inputs.release_tag }}
3743 ghcr_repository : ppat/coder-workspace
3844 timeout_minutes : 180
3945 secrets :
@@ -50,11 +56,20 @@ jobs:
5056 runs-on : ubuntu-latest
5157 timeout-minutes : 15
5258 steps :
53- - name : Checkout
59+ - name : Checkout publishing automation
5460 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5561 with :
5662 fetch-depth : 1
5763 persist-credentials : false
64+ path : .automation
65+ ref : main
66+
67+ - name : Checkout release source
68+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
69+ with :
70+ fetch-depth : 1
71+ persist-credentials : false
72+ path : release
5873 ref : ${{ env.source_ref }}
5974
6075 - name : Tailscale Connect
@@ -67,16 +82,16 @@ jobs:
6782 version : " 1.102.4"
6883
6984 - name : Login to Coder
70- uses : ./actions/coder-cli-login
85+ uses : ./.automation/ actions/coder-cli-login
7186 with :
7287 coder_url : ${{ secrets.CODER_URL }}
7388 coder_email : ${{ secrets.CODER_EMAIL }}
7489 coder_password : ${{ secrets.CODER_PASSWORD }}
7590
7691 - name : Publish template
77- uses : ./actions/coder-template-push
92+ uses : ./.automation/ actions/coder-template-push
7893 with :
79- template_dir : ${{ env.template_path }}
94+ template_dir : release/ ${{ env.template_path }}
8095 template_name : ${{ env.template_name }}
8196 template_version : ${{ env.source_sha }}
8297 workspace_image : " ghcr.io/ppat/coder-workspace:${{ needs.publish-image.outputs.image_tag }}"
0 commit comments