Skip the post run step entirely if the cache is disabled#845
Open
edmorley wants to merge 1 commit intoactions:mainfrom
Open
Skip the post run step entirely if the cache is disabled#845edmorley wants to merge 1 commit intoactions:mainfrom
edmorley wants to merge 1 commit intoactions:mainfrom
Conversation
Author
|
@priya-kinthali Hi! Please could I have a review? |
Contributor
|
Hello @edmorley, Thank you for creating this PR, we will review this PR and get back to you once we have some feedback on this. |
db62d43 to
d653820
Compare
Author
|
@aparnajyothi-y I've rebased this PR on |
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
Author
|
@aparnajyothi-y Hi! Did you have any news on this? This one line PR has been open for over a year. Thanks :-) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Previously if
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-ifsyntax supporting thegithub.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
Related issue:
N/A
Check list: