Files
go-action/main.go

26 lines
355 B
Go
Raw Normal View History

2025-11-24 01:19:25 +03:00
package main
2025-11-24 01:32:17 +03:00
import (
"fmt"
2025-11-24 01:46:07 +03:00
"log"
2025-11-24 01:32:17 +03:00
"os"
)
2025-11-24 01:19:25 +03:00
func main() {
2025-11-24 01:32:17 +03:00
for _, v := range os.Environ() {
fmt.Println(v)
}
2025-11-24 01:46:07 +03:00
giteaEnvFile, ok := os.LookupEnv("GITEA_ENV")
if !ok {
log.Fatalln("Gitea env file not found")
}
raw, err := os.ReadFile(giteaEnvFile)
if err != nil {
log.Fatalln("Gitea env file read error:", err)
}
fmt.Println(string(raw))
2025-11-24 01:19:25 +03:00
}