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 post-step to do graceful logout #23

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kriberg
Copy link

@kriberg kriberg commented May 25, 2022

Description

This PR adds a post step to the action that runs oc logout and then deletes the kube config file. That should clean up any residual authentication, in case the runner will be re-used.

Related Issue(s)

Fixes #2

Checklist

  • This PR includes a documentation change
  • This PR does not need a documentation change

  • This PR includes test changes
  • This PR's changes are already tested

  • This change is not user-facing
  • This change is a patch change
  • This change is a minor change
  • This change is a major (breaking) change

Changes made

  • Changes action description to run post step that does logout and cleanup.

@github-actions github-actions bot added the CRDA Scan Pending CRDA scan waiting for approval label May 25, 2022
@divyansh42
Copy link
Member

@kriberg Thanks for your contribution!
Could you please add logout option as an input to this action and let users decide if they want to logout.
Default can be set to true.
Very similar to this action https://github.com/redhat-actions/podman-login/blob/main/action.yml#L20

@kriberg
Copy link
Author

kriberg commented May 25, 2022

@kriberg Thanks for your contribution! Could you please add logout option as an input to this action and let users decide if they want to logout. Default can be set to true. Very similar to this action https://github.com/redhat-actions/podman-login/blob/main/action.yml#L20

Will do

Copy link
Member

@divyansh42 divyansh42 left a comment

Choose a reason for hiding this comment

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

This PR looks good to me.
It would be great if you can add logout test here.

src/index.ts Outdated Show resolved Hide resolved
@kriberg kriberg requested a review from divyansh42 May 31, 2022 18:37
@divyansh42 divyansh42 added the CRDA Scan Approved CRDA scan approved by a collaborator label Jun 3, 2022
@github-actions github-actions bot added CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Pending CRDA scan waiting for approval labels Jun 3, 2022
Signed-off-by: Kristian Berg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CRDA Scan Approved CRDA scan approved by a collaborator CRDA Scan Passed CRDA found no vulnerabilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 'post' step that logs out
2 participants