Skip to content

Commit 2610d5d

Browse files
committed
Support direct debug deploy from rootfs hash
1 parent cd7cb4f commit 2610d5d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/aleph-service-vm.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ env:
9595

9696
jobs:
9797
build-rootfs:
98+
if: ${{ github.event_name == 'push' || inputs.rootfs_item_hash == '' }}
9899
uses: NiKrause/relay-button/.github/workflows/aleph-rootfs-build-publish-deploy.yml@codex/ucan-store-caddy-service-origin
99100
with:
100101
profile: ucan-store
@@ -109,7 +110,7 @@ jobs:
109110

110111
deploy-vm:
111112
needs: build-rootfs
112-
if: ${{ github.event_name == 'workflow_dispatch' && inputs.deploy_vm }}
113+
if: ${{ always() && github.event_name == 'workflow_dispatch' && inputs.deploy_vm && (needs.build-rootfs.result == 'success' || needs.build-rootfs.result == 'skipped') }}
113114
runs-on: ubuntu-24.04
114115
steps:
115116
- name: Deploy ucan-store upload-service VM
@@ -124,7 +125,7 @@ jobs:
124125
aleph_private_key: ${{ secrets.ALEPH_PRIVATE_KEY }}
125126
ssh_public_key: ${{ inputs.vm_ssh_public_key != '' && inputs.vm_ssh_public_key || secrets.VM_SSH_PUBLIC_KEY }}
126127
rootfs_item_hash: ${{ inputs.rootfs_item_hash != '' && inputs.rootfs_item_hash || needs.build-rootfs.outputs.rootfs_item_hash }}
127-
rootfs_version: ${{ needs.build-rootfs.outputs.rootfs_version }}
128+
rootfs_version: ${{ inputs.rootfs_version != '' && inputs.rootfs_version || needs.build-rootfs.outputs.rootfs_version || 'ucan-store-v0.1.0' }}
128129
rootfs_size_mib: ${{ inputs.vm_rootfs_size_mib }}
129130
api_hosts: ${{ inputs.vm_api_hosts != '' && inputs.vm_api_hosts || vars.ALEPH_VM_API_HOSTS }}
130131
crn_hash: ${{ inputs.vm_crn_hash != '' && inputs.vm_crn_hash || vars.ALEPH_VM_CRN_HASH }}
@@ -153,8 +154,8 @@ jobs:
153154
154155
- name: Summarize upload-service deployment
155156
env:
156-
ROOTFS_ITEM_HASH: ${{ needs.build-rootfs.outputs.rootfs_item_hash }}
157-
ROOTFS_VERSION: ${{ needs.build-rootfs.outputs.rootfs_version }}
157+
ROOTFS_ITEM_HASH: ${{ inputs.rootfs_item_hash != '' && inputs.rootfs_item_hash || needs.build-rootfs.outputs.rootfs_item_hash }}
158+
ROOTFS_VERSION: ${{ inputs.rootfs_version != '' && inputs.rootfs_version || needs.build-rootfs.outputs.rootfs_version || 'ucan-store-v0.1.0' }}
158159
ROOTFS_MANIFEST_GATEWAY_URL: ${{ needs.build-rootfs.outputs.rootfs_manifest_gateway_url }}
159160
INSTANCE_ITEM_HASH: ${{ steps.deploy.outputs.instance_item_hash }}
160161
INSTANCE_STATUS: ${{ steps.deploy.outputs.instance_status }}

0 commit comments

Comments
 (0)