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

GHA: Remove {pre,post}-action steps for self-hosted runners #403

Merged

Conversation

BbolroC
Copy link
Member

@BbolroC BbolroC commented Jul 31, 2024

The following hooks:

  • ACTIONS_RUNNER_HOOK_JOB_STARTED
  • ACTIONS_RUNNER_HOOK_JOB_COMPLETED

could perfectly replace the existing {pre,post}-action scripts and will make a workflow independent of the runner context. This PR wipes out all GHA steps where the actions are triggered.

Signed-off-by: Hyounggyu Choi Hyounggyu.Choi@ibm.com

@AdithyaKrishnan please let me know when the runner for SEV/SNP is ready for this. I will ask for review when you guys are ready. Thanks.

The following hooks:

- ACTIONS_RUNNER_HOOK_JOB_STARTED
- ACTIONS_RUNNER_HOOK_JOB_COMPLETED

could perfectly replace the existing {pre,post}-action scripts
and will make a workflow independent of the runner context.
This commit wipes out all GHA steps where the actions are triggered.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
Copy link
Contributor

@ldoktor ldoktor left a comment

Choose a reason for hiding this comment

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

Yep, those env variables seems to do exactly that so once the workers are configured it should be fine removing them here (as far as the {pre,post}_action.sh does not require some extra knowledge about the PR that wouldn't be available in the hooks but I think that shouldn't be the case, rigth?)

@BbolroC
Copy link
Member Author

BbolroC commented Jul 31, 2024

Yep, those env variables seems to do exactly that so once the workers are configured it should be fine removing them here (as far as the {pre,post}_action.sh does not require some extra knowledge about the PR that wouldn't be available in the hooks but I think that shouldn't be the case, rigth?)

Yes, {pre,post}_action.sh does not depend on the workflow context. So it would be fine to simply remove them from the workflow. Thanks.

@AdithyaKrishnan
Copy link
Contributor

@BbolroC AMD SEV and SNP Coco runners are ready. Please go ahead

Copy link
Contributor

@AdithyaKrishnan AdithyaKrishnan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

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

LGTM

@BbolroC BbolroC merged commit dbdb984 into confidential-containers:main Jul 31, 2024
13 of 14 checks passed
@BbolroC BbolroC deleted the remove-pre-post-action-s390x branch July 31, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants