Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip the post run step entirely if the cache is disabled #845

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 8, 2024

  1. Skip the post run step entirely if the cache is disabled

    Previously if the `cache: false` (the default for this Action), the
    Action's "post run" step would still be executed.
    
    Whilst this step was fast (since it returned early if the cache was
    disabled), it still causes unnecessary noise in the job's steps list.
    
    For example as seen in:
    https://github.com/pypa/get-pip/actions/runs/8679713478/job/23798960684
    
    Now, the post run step is skipped if the cache is disabled, thanks
    to the `post-if` syntax supporting the `github.events.inputs.*`
    context.
    
    See:
    https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if
    https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/action.yml#L40
    edmorley committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    db62d43 View commit details
    Browse the repository at this point in the history