Description
Describe the enhancement
We would like to see timeout-minutes
supported on steps in composite actions
Code Snippet
If applicable, add a code snippet.
name: terraform-cache
inputs:
working-directory:
description: Directory to run terraform in
required: false
default: ""
runs:
using: composite
steps:
- name: Cache Terraform
uses: actions/cache@v3
timeout-minutes: 2
with:
path: ${{ runner.temp }}/.terraform.d/plugin-cache
key: ${{ runner.os }}-terraform-${{ inputs.working-directory }}-${{ hashFiles('**/.terraform.lock.hcl') }}
restore-keys: |
${{ runner.os }}-terraform-${{ inputs.working-directory }}-
${{ runner.os }}-terraform-
Additional information
Occasionally actions like actions/cache bug out (see actions/cache#810 etc) and run for the default timeout time (6 hours) which causes unnecessary costs and extra work as CI will be left running and needs to be aborted and re-run.
With the possibility to set timeout-minutes on steps in composite actions this damage could be limited and have actions finish in a timely manner even if the cache action fails.
I see from previous ADRs 0549 and 1144 that timeout-minutes are to be considered in the future and last mention it was waited with due to little buzz about this feature missing, so heres some buzz 🐝 🙂
NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md