Add timeout workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |