]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Lazily unmount github workspace at end of workflow.
authorDarren Tucker <dtucker@dtucker.net>
Tue, 11 Mar 2025 08:17:46 +0000 (19:17 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 11 Mar 2025 08:25:44 +0000 (19:25 +1100)
Sometimes when a test times out the workspace is still busy when we try
to unmount it, which leaves the runner unusable until it's cleaned up
manually. We try to unmount this in the first step, but that usually
doesn't work since it fails during setup before it starts our workflow.
Move it to the end and make it a lazy unmount so it hopefully works
eventually.

.github/workflows/selfhosted.yml

index 22bf2fb2c8542aa7b26aac8f86a99b4ae4be3271..d892a28c3eb6efa142a816c18bf0c3eddc9abda8 100644 (file)
@@ -101,10 +101,6 @@ jobs:
           - { target: openwrt-mips, config: default, host: remote-openwrt-mips }
           - { target: openwrt-mipsel, config: default, host: remote-openwrt-mipsel }
     steps:
-    - name: unmount stale workspace
-      if: env.SSHFS == 'true'
-      run: fusermount -u ${GITHUB_WORKSPACE} || true
-      working-directory: ${{ runner.temp }}
     - name: shutdown VM if running
       if: env.VM == 'true'
       run: vmshutdown
@@ -195,9 +191,13 @@ jobs:
 
     - name: bigendian interop - unmount regress
       if: always() && env.SSHFS == 'true' && env.BIGENDIAN == 'true'
-      run: fusermount -u ${GITHUB_WORKSPACE}/regress || true
+      run: fusermount -z -u ${GITHUB_WORKSPACE}/regress || true
       working-directory: ${{ runner.temp }}
 
+    - name: lazily unmount workspace
+      if: always() && env.SSHFS == 'true'
+      run: fusermount -z -u ${GITHUB_WORKSPACE} || true
+      working-directory: ${{ runner.temp }}
     - name: shutdown VM
       if: always() && env.VM == 'true'
       run: vmshutdown