diff --git a/.github/workflows/timeout.yml b/.github/workflows/timeout.yml new file mode 100644 index 0000000..fad0c37 --- /dev/null +++ b/.github/workflows/timeout.yml @@ -0,0 +1,21 @@ +name: Testing timeout + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + timeout: + runs-on: ubuntu-latest + steps: + - name: Write file and sleep Sleep for 2 minutes + run: echo "hello there" > hello.txt && sleep 120 + timeout-minutes: 1 + + - name: upload hello.txt + uses: actions/upload-artifact@v4 + with: + name: hello.txt + path: hello.txt + if: always()