Skip to content
Discussion options

You must be logged in to vote

Hello @ChauCM

You could utilize GitHub actions default environment variables, like GITHUB_ACTIONS, which is always set to true when GH actions is running the workflow.
A simple solution here would be just to wrap a simple boolean if around the code you don't want to run on GH actions, like this:

if(!System.getenv()["GITHUB_ACTIONS"]){
      storeFile file(System.getenv()["CM_KEYSTORE_PATH"])
      storePassword System.getenv()["CM_KEYSTORE_PASSWORD"]
      keyAlias System.getenv()["CM_KEY_ALIAS"]
      keyPassword System.getenv()["CM_KEY_PASSWORD"]
}

Take a look at GitHub Docs for Actions' Environment Variables and hopefully you get everything resolved.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kulakarla
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants