Created
August 16, 2020 05:24
-
-
Save luandevpro/5f1d964a3b51c822e881336e1083d7ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
// Access Inputs as environment vars | |
firstGreeting := os.Getenv("INPUT_FIRSTGREETING") | |
secondGreeting := os.Getenv("INPUT_SECONDGREETING") | |
thirdGreeting := os.Getenv("INPUT_THIRDGREETING") | |
// Use those inputs in the actions logic | |
fmt.Println("Hello " + firstGreeting) | |
fmt.Println("Hello " + secondGreeting) | |
// Someimes inputs are not "required" and we can build around that | |
if thirdGreeting != "" { | |
fmt.Println("Hello " + thirdGreeting) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment