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

add option copy_artifacts_on_fail #63

Merged
merged 3 commits into from
Jan 7, 2023
Merged

add option copy_artifacts_on_fail #63

merged 3 commits into from
Jan 7, 2023

Conversation

nandofw
Copy link
Contributor

@nandofw nandofw commented Nov 23, 2022

  • add option to copy artifacts if a command exits with a non-zero status

useful when running tests and want to copy the test result even if the test fail

action.yml Outdated
@@ -233,6 +238,7 @@ runs:
exit $rc
shell: bash
- name: Copy artifacts within image
if: ${{ always() && inputs.copy_artifacts_on_fail == 'yes' || steps.runcmd.conclusion != 'failure' }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please use success() instead of always() here? I believe always() has a special semantic regarding cancelled tasks.

Copy link
Contributor Author

@nandofw nandofw Nov 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with success() it does not work, perhaps a combination of always() && !cancelled() in this way it should skip the step if the job get canceled

@pguyot pguyot merged commit 6d6dca0 into pguyot:main Jan 7, 2023
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.

None yet

2 participants