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

Print logs in post step for localnet action #10

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

banool
Copy link
Contributor

@banool banool commented Jun 21, 2024

As it is now you can't actually see the logs at the end because the logging steps run before the rest of the job. This way they run as a post step.

Unfortunately we need this post step hack. See actions/runner#1478.

@banool banool force-pushed the banool/localnet-post branch 13 times, most recently from c293310 to f335da7 Compare June 21, 2024 16:58
@banool banool changed the title Print logs on failure in post step for localnet action Print logs in post step for localnet action Jun 21, 2024
Copy link
Contributor

@rustielin rustielin left a comment

Choose a reason for hiding this comment

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

LGTM, amazing workaround. Just remember to update the action ref to use a git ref rather than a local path

# There is no way to configure post-if with this, so we just always print the logs
# in the post step.
- name: Set up printing logs in a post step
uses: ./with-post-step
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no guarantee that the calling job has this path since it's unlikely to have cloned the entire aptos-labs/actions repo, so you'll likely need to do aptos-labs/actions/with-post-step@main.

@@ -0,0 +1,18 @@
## Description

Generic JS Action to execute a main command and set a command as a post step.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy the important links here too for context:
e.g. actions/runner#1478 and https://github.com/pyTooling/Actions/tree/main/with-post-step

@banool banool force-pushed the banool/localnet-post branch from f335da7 to ea14225 Compare June 23, 2024 20:44
@banool banool force-pushed the banool/localnet-post branch from c30c519 to 8c83573 Compare June 23, 2024 20:45
@banool banool merged commit 06bb886 into main Jun 23, 2024
3 of 6 checks passed
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