From 2b8d25db1b74237f20ac51b8376b8408c7b4ac5a Mon Sep 17 00:00:00 2001 From: Josh Komoroske Date: Fri, 9 Feb 2024 16:51:23 -0500 Subject: [PATCH] chore: debug --- .github/workflows/build.yaml | 2 -- main.go | 10 ++++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3c300b7..64b01cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,8 +2,6 @@ name: Build on: pull_request: push: - branches: - - "master" jobs: build: diff --git a/main.go b/main.go index a6b0818..1784750 100644 --- a/main.go +++ b/main.go @@ -23,19 +23,25 @@ func main() { //nolint:forbidigo,wsl func mainCmd() error { + fmt.Printf("::group::%s\n", "Debug") + for _, env := range os.Environ() { + fmt.Println(env) + } + fmt.Println("::endgroup::") + var image string flag.StringVar(&image, "image", "", "ghcr.io image to run") flag.Parse() if image == "" { - image = fmt.Sprintf("ghcr.io/%s:%s", os.Getenv("GITHUB_REPOSITORY"), os.Getenv("GITHUB_ACTION_REF")) + image = fmt.Sprintf("ghcr.io/%s:%s", os.Getenv("GITHUB_ACTION_REPOSITORY"), os.Getenv("GITHUB_ACTION_REF")) } var token string if value := os.Getenv("GITHUB_TOKEN"); value != "" { // Environment variable named "GITHUB_TOKEN". token = value - } else if value := os.Getenv("INPUT_GITHUB_TOKEN"); value != "" { + } else if value := os.Getenv("INPUT_GITHUB-TOKEN"); value != "" { // Input named "github-token". token = value } else if value := os.Getenv("INPUT_TOKEN"); value != "" {