Skip to content

Commit 0d89e74

Browse files
committed
Add timeout workflow
1 parent 90a4146 commit 0d89e74

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/timeout.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Testing timeout
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
timeout:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Write file and sleep Sleep for 2 minutes
13+
run: echo "hello there" > hello.txt && sleep 120
14+
timeout-minutes: 1
15+
16+
- name: upload hello.txt
17+
uses: actions/upload-artifact@v4
18+
with:
19+
name: hello.txt
20+
path: hello.txt
21+
if: always()

0 commit comments

Comments
 (0)