Prevent Waste by Specifying timeout-minutes in GitHub Actions
Tadashi Shigeoka · Tue, January 12, 2021
I’ll introduce how to prevent waste by specifying timeout-minutes in GitHub Actions Workflow.
Background: The job running on runner GitHub Actions n has exceeded the maximum execution time of 360 minutes.
A maximum 6-hour timeout occurred in GitHub Actions, resulting in the following error:
The job running on runner GitHub Actions 4 has exceeded the maximum execution time of 360 minutes.
Solution: Use timeout-minutes
jobs:
your-job:
runs-on: ubuntu-latest
timeout-minutes: 30 # entire job
steps:
- run: sleep 300
timeout-minutes: 20 # individual step
That’s all from the Gemba on wanting to specify timeout-minutes in GitHub Actions Workflow to prevent wasteful minute quota consumption.
Reference Information
- [GitHub] Recommendation for Timeout Specification in Actions Workflow | Developers.IO ([GitHub]Actions Workflowへのtimeout指定のススメ | Developers.IO)
- GitHub Actions Workflow Syntax - GitHub Docs (GitHub Actionsのワークフロー構文 - GitHub Docs)