From: Darren Tucker Date: Tue, 11 Mar 2025 08:17:46 +0000 (+1100) Subject: Lazily unmount github workspace at end of workflow. X-Git-Tag: V_10_0_P1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c21c8fc319376c2f5e0da166e9e89a97a245ae72;p=thirdparty%2Fopenssh-portable.git Lazily unmount github workspace at end of workflow. 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. --- diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 22bf2fb2c..d892a28c3 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -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