diff --git a/.github/workflows/create-instance.yml b/.github/workflows/create-instance.yml index 66280583..78764417 100644 --- a/.github/workflows/create-instance.yml +++ b/.github/workflows/create-instance.yml @@ -376,6 +376,30 @@ jobs: attach_volume: ⏳ send_email: "" + - name: Rename MyData directory to MyData-tmp + id: rename_mydata + run: | + ssh \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + -o LogLevel=ERROR \ + exouser@$INSTANCE_IP \ + 'mv /media/volume/MyData /media/volume/MyData-tmp' + env: + INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }} + + - name: comment (failed to rename MyData) + if: ${{ steps.rename_mydata.outcome == 'failure' && failure() }} + uses: peter-evans/create-or-update-comment@v4.0.0 + with: + issue-number: ${{ github.event.issue.number }} + body: | + ### Instance Creation Results ❌ + + Failed to rename `/media/volume/MyData` to `/media/volume/MyData-tmp` for instance **${{ steps.define.outputs.instance_name }}**. + + See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + - name: Attach Volume id: attach_volume run: | @@ -419,6 +443,30 @@ jobs: See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + - name: Copy installed files into attached volume + id: copy_installed_files + run: | + ssh \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + -o LogLevel=ERROR \ + exouser@$INSTANCE_IP \ + 'mv /media/volume/MyData-tmp/Slicer /media/volume/MyData/Slicer && mv /media/volume/MyData-tmp/dist /media/volume/MyData/dist' + env: + INSTANCE_IP: ${{ steps.ip_create.outputs.floating_ip_address }} + + - name: comment (failed to copy installed files from MyData-tmp to MyData) + if: ${{ steps.copy_installed_files.outcome == 'failure' && failure() }} + uses: peter-evans/create-or-update-comment@v4.0.0 + with: + issue-number: ${{ github.event.issue.number }} + body: | + ### Instance Creation Results ❌ + + Failed to copy installed files from `/media/volume/MyData-tmp` to `/media/volume/MyData` for instance **${{ steps.define.outputs.instance_name }}**. + + See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + - name: Update Request Status Label id: update-request-status-label uses: ./.github/actions/update-request-status-label