Skip to content

Conversation

edmorley
Copy link

@edmorley edmorley commented Apr 14, 2024

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

Screenshot of post run step noise

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

Related issue:
N/A

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@edmorley edmorley requested a review from a team as a code owner April 14, 2024 12:49
@edmorley
Copy link
Author

edmorley commented Jul 8, 2024

@priya-kinthali Hi! Please could I have a review?

@aparnajyothi-y
Copy link
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.

@edmorley
Copy link
Author

@aparnajyothi-y I've rebased this PR on main - could you approve the workflow runs for CI? :-)

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
Copy link
Author

edmorley commented Jul 8, 2025

@aparnajyothi-y Hi! Did you have any news on this? This one line PR has been open for over a year. Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants