ci: timeout-minutes has a known issue with composite
use timeout for the step in main workflow instead https://github.com/actions/runner/issues/1979 https://github.com/metabase/metabase/pull/24554/files once support for timeout-minutes is added we can remove these steps Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
This commit is contained in:
10 files changed
+31
-10
No files matched your search
@@ -3,26 +3,18 @@ description: "Setup tmate session if the test fails"
|
||||
inputs:
|
||||
use-tmate:
|
||||
description: "boolean for enabling TMATE"
|
||||
required: false
|
||||
timeout-minutes:
|
||||
description: "timeout tmate debug session"
|
||||
required: false
|
||||
default: '60'
|
||||
# ...name, description and inputs as above
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: consider debugging
|
||||
shell: bash --noprofile --norc -eo pipefail -x {0}
|
||||
if: failure() && github.event_name == 'pull_request'
|
||||
run: |
|
||||
# Enable tmate only in the Rook fork, where the USE_TMATE secret is set in the repo, or if the action is re-run
|
||||
if [ "$GITHUB_REPOSITORY_OWNER" = "rook" ] || [ -n "${{ inputs.use-tmate }}" ] || [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then
|
||||
echo USE_TMATE=1 >> $GITHUB_ENV
|
||||
fi
|
||||
echo "${{ inputs.timeout-minutes }}"
|
||||
|
||||
- name: set up tmate session for debugging
|
||||
if: failure() && env.USE_TMATE
|
||||
if: env.USE_TMATE
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
timeout-minutes: "${{ inputs.timeout-minutes }}"
|
||||
Reference in new issue
Block a user