Handling secrets
            
            #1206
          
          
        -
| 
         Say I have something like: How do I best handle that secret value? Ideally it could be populated maybe via a Github workflow, e.g. ${{ secrets.api-key }}, but I am not sure how to interpolate that in a pkl workflow. Any suggestions please?  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            HT154
          
      
      
        Sep 15, 2025 
      
    
    Replies: 1 comment 1 reply
-
| 
         The simple way to do this is to  myProp = read("prop:apikey")
myEnv = read("env:APIKEY")A more complex (but more secure) way to do this is using an external reader to directly connect to some secret store without potentially exposing secrets via CLI args or the environment.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        kaihendry
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
The simple way to do this is to
readthe value from the environment or an external property:A more complex (but more secure) way to do this is using an external reader to directly connect to some secret store without potentially exposing secrets via CLI args or the environment.