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

Show service container logs on teardown #1563

Merged
merged 2 commits into from
Dec 20, 2021

Conversation

karagog
Copy link
Contributor

@karagog karagog commented Dec 16, 2021

This will export the service container logs at the end of a GitHub action right before they're torn down. This information can be very useful for debugging, and it's a pain to manually export logs on an as-needed basis.

@karagog karagog requested a review from a team as a code owner December 16, 2021 21:03
TingluoHuang
TingluoHuang previously approved these changes Dec 17, 2021
@karagog
Copy link
Contributor Author

karagog commented Dec 17, 2021

Note that I think this will also print the logs for the container that's running your current job action (if you're running in a container), which may be redundant b/c I think that log is already printed in a different place. But I'm not sure how to isolate just the service container logs, so I just printed all container logs.

@TingluoHuang
Copy link
Member

@karagog you can filter job container out with if(!container.IsJobContainer){ run docker log}.

@karagog
Copy link
Contributor Author

karagog commented Dec 17, 2021

@TingluoHuang Done.

@TingluoHuang TingluoHuang merged commit 698d3a2 into actions:main Dec 20, 2021
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