From ba47be835dff51fdda7512b978e20d2d72334c4c Mon Sep 17 00:00:00 2001
From: Daniel Noland <daniel@githedgehog.com>
Date: Mon, 4 Nov 2024 15:19:56 -0700
Subject: [PATCH] tmate

---
 .github/workflows/build-and-deploy-docs.yml      |  5 +++--
 .github/workflows/check-developer-experience.yml |  1 +
 .github/workflows/sterile-build-and-test.yml     |  4 ++++
 .github/workflows/update-versions.yml            | 13 +++++++++++++
 4 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml
index e2b4e1d4a..4e42d5785 100644
--- a/.github/workflows/build-and-deploy-docs.yml
+++ b/.github/workflows/build-and-deploy-docs.yml
@@ -121,9 +121,10 @@ jobs:
           NETLIFY_AUTH_TOKEN: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
           NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}"
         timeout-minutes: 5
+
       - name: Setup tmate session for debug
-        if: ${{ failure() }}
+        if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
         uses: mxschmitt/action-tmate@v3
-        timeout-minutes: 30
+        timeout-minutes: 60
         with:
           limit-access-to-actor: true
diff --git a/.github/workflows/check-developer-experience.yml b/.github/workflows/check-developer-experience.yml
index d51c8d160..e64c6cd9c 100644
--- a/.github/workflows/check-developer-experience.yml
+++ b/.github/workflows/check-developer-experience.yml
@@ -119,6 +119,7 @@ jobs:
         with:
           name: "test-results-${{ matrix.rust.toolchain  }}"
           path: target/nextest/
+
       - name: Setup tmate session for debug
         if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
         uses: mxschmitt/action-tmate@v3
diff --git a/.github/workflows/sterile-build-and-test.yml b/.github/workflows/sterile-build-and-test.yml
index 89270a87e..2bf3121ea 100644
--- a/.github/workflows/sterile-build-and-test.yml
+++ b/.github/workflows/sterile-build-and-test.yml
@@ -77,13 +77,16 @@ jobs:
       # NOTE: we don't even install rust till the sterile tests are done (lowers contamination risk)
       - name: install rust
         uses: dtolnay/rust-toolchain@stable
+        if: ${{ always() }}
         with:
           toolchain: ${{ matrix.rust }}
           targets: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl
 
       - uses: cargo-bins/cargo-binstall@main
+        if: ${{ always() }}
 
       - name: install openssl and libssl-dev (needed for markdown-test-report)
+        if: ${{ always() }}
         run: |
           sudo apt-get update
           sudo apt-get --yes --no-install-recommends install \
@@ -173,6 +176,7 @@ jobs:
       - run: just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-gnu push-container
       - run: just rust="${{matrix.rust}}" profile=debug target=x86_64-unknown-linux-musl push-container
       - run: just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl push-container
+
       - name: Setup tmate session for debug
         if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
         uses: mxschmitt/action-tmate@v3
diff --git a/.github/workflows/update-versions.yml b/.github/workflows/update-versions.yml
index efd4e2360..91196aeb6 100644
--- a/.github/workflows/update-versions.yml
+++ b/.github/workflows/update-versions.yml
@@ -11,6 +11,12 @@
 name: Update Version
 on:
   workflow_dispatch:
+    inputs:
+      debug_enabled:
+        type: boolean
+        description: "Run with tmate enabled"
+        required: false
+        default: false
   schedule:
     # Check for updates at 3:18am every day.
     # I avoid midnight because everyone uses midnight and
@@ -58,3 +64,10 @@ jobs:
           commit-message: 'bump dpdk-sys'
           sign-commits: 'true'
           body: 'bump dpdk-sys'
+
+      - name: Setup tmate session for debug
+        if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
+        uses: mxschmitt/action-tmate@v3
+        timeout-minutes: 60
+        with:
+          limit-access-to-actor: true