From 61e4a616a44323163bcb86de295591f4065dd15b Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Thu, 16 Nov 2023 15:12:10 -0800 Subject: [PATCH 1/7] feat: logging in github actions --- .github/workflows/sdk-generation.yaml | 21 ++++- action.yml | 2 +- internal/actions/finalize-suggestion.go | 3 +- internal/actions/finalize.go | 2 +- internal/actions/finalizeDocs.go | 2 +- internal/actions/generate.go | 4 +- internal/actions/generateDocs.go | 4 +- internal/actions/log.go | 109 ++++++++++++++++++++++++ internal/actions/suggest.go | 3 +- internal/actions/validate.go | 6 +- internal/cli/speakeasy.go | 12 +-- internal/environment/environment.go | 1 + main.go | 2 + 13 files changed, 153 insertions(+), 18 deletions(-) create mode 100644 internal/actions/log.go diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index 1c0dc89d..5a336022 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -196,7 +196,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: validate - uses: speakeasy-api/sdk-generation-action@v14 + uses: speakeasy-api/sdk-generation-action@v14.34 with: speakeasy_version: ${{ inputs.speakeasy_version }} openapi_doc_location: ${{ inputs.openapi_doc_location }} @@ -226,6 +226,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.34 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" generate: name: Generate SDK runs-on: ubuntu-latest @@ -257,7 +272,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: generate - uses: speakeasy-api/sdk-generation-action@v14 + uses: speakeasy-api/sdk-generation-action@v14.34 with: speakeasy_version: ${{ inputs.speakeasy_version }} openapi_doc_location: ${{ inputs.openapi_doc_location }} @@ -623,7 +638,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: Finalize - uses: speakeasy-api/sdk-generation-action@v14 + uses: speakeasy-api/sdk-generation-action@v14.34 with: github_access_token: ${{ secrets.github_access_token }} languages: ${{ inputs.languages }} diff --git a/action.yml b/action.yml index b7f248b5..7f5f497e 100644 --- a/action.yml +++ b/action.yml @@ -209,7 +209,7 @@ outputs: description: "The location of the OpenAPI document used for generation" runs: using: "docker" - image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v14" + image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v14.34" env: SPEAKEASY_API_KEY: ${{ inputs.speakeasy_api_key }} SPEAKEASY_SERVER_URL: ${{ inputs.speakeasy_server_url }} diff --git a/internal/actions/finalize-suggestion.go b/internal/actions/finalize-suggestion.go index 3cd1bac7..2e078d80 100644 --- a/internal/actions/finalize-suggestion.go +++ b/internal/actions/finalize-suggestion.go @@ -2,6 +2,7 @@ package actions import ( "errors" + "github.com/speakeasy-api/sdk-generation-action/internal/cli" "github.com/speakeasy-api/sdk-generation-action/internal/environment" "github.com/speakeasy-api/sdk-generation-action/internal/logging" @@ -34,7 +35,7 @@ func FinalizeSuggestion() error { return err } - if err = cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { + if _, err = cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { return err } diff --git a/internal/actions/finalize.go b/internal/actions/finalize.go index e5a84d72..78bf0be1 100644 --- a/internal/actions/finalize.go +++ b/internal/actions/finalize.go @@ -37,7 +37,7 @@ func Finalize() error { switch environment.GetMode() { case environment.ModePR: - if err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { + if _, err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { return err } diff --git a/internal/actions/finalizeDocs.go b/internal/actions/finalizeDocs.go index 63461e55..56d6957b 100644 --- a/internal/actions/finalizeDocs.go +++ b/internal/actions/finalizeDocs.go @@ -36,7 +36,7 @@ func FinalizeDocs() error { switch environment.GetMode() { case environment.ModePR: - if err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { + if _, err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { return err } diff --git a/internal/actions/generate.go b/internal/actions/generate.go index 03c78297..a9186c28 100644 --- a/internal/actions/generate.go +++ b/internal/actions/generate.go @@ -16,7 +16,8 @@ func Generate() error { return err } - if err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { + resolvedVersion, err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g) + if err != nil { return err } @@ -47,6 +48,7 @@ func Generate() error { }() genInfo, outputs, err := generate.Generate(g) + outputs["resolved_speakeasy_version"] = resolvedVersion if err != nil { if err := setOutputs(outputs); err != nil { logging.Debug("failed to set outputs: %v", err) diff --git a/internal/actions/generateDocs.go b/internal/actions/generateDocs.go index 78739234..2f330445 100644 --- a/internal/actions/generateDocs.go +++ b/internal/actions/generateDocs.go @@ -14,7 +14,8 @@ func GenerateDocs() error { return err } - if err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { + resolvedVersion, err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g) + if err != nil { return err } @@ -45,6 +46,7 @@ func GenerateDocs() error { }() genInfo, outputs, err := generate.GenerateDocs(g) + outputs["resolved_speakeasy_version"] = resolvedVersion if err != nil { if err := setOutputs(outputs); err != nil { logging.Debug("failed to set outputs: %v", err) diff --git a/internal/actions/log.go b/internal/actions/log.go new file mode 100644 index 00000000..a0c07bbb --- /dev/null +++ b/internal/actions/log.go @@ -0,0 +1,109 @@ +package actions + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "os" + "strings" + "time" + + "github.com/speakeasy-api/sdk-generation-action/internal/environment" + "gopkg.in/yaml.v3" +) + +const defaultAPIURL = "https://api.prod.speakeasyapi.dev" + +type logProxyLevel string + +const ( + logProxyLevelInfo logProxyLevel = "info" + logProxyLevelError logProxyLevel = "error" +) + +type logProxyEntry struct { + LogLevel logProxyLevel `json:"log_level"` + Message string `json:"message"` + Source string `json:"source"` + Tags map[string]interface{} `json:"tags"` +} + +func LogActionResult() error { + key := os.Getenv("SPEAKEASY_API_KEY") + if key == "" { + return fmt.Errorf("no speakeasy api key available") + } + + logLevel := logProxyLevelInfo + logMessage := "Success in Github Action" + if !strings.Contains(strings.ToLower(os.Getenv("GH_ACTION_RESULT")), "success") { + logLevel = logProxyLevelError + logMessage = "Failure in Github Action" + } + + request := logProxyEntry{ + LogLevel: logLevel, + Message: logMessage, + Source: "gh_action", + Tags: map[string]interface{}{ + "target": os.Getenv("TARGET"), + "speakeasy_version": os.Getenv("RESOLVED_SPEAKEASY_VERSION"), + "gh_repo": os.Getenv("GITHUB_REPOSITORY"), + "gh_action_version": os.Getenv("GH_ACTION_VERSION"), + "gh_action_step": os.Getenv("GH_ACTION_STEP"), + "gh_action_result": os.Getenv("GH_ACTION_RESULT"), + "gh_action_run": fmt.Sprintf("https://github.com/%s/actions/runs/%s", os.Getenv("GITHUB_REPOSITORY"), os.Getenv("GITHUB_RUN_ID")), + "run_origin": "gh_action", + }, + } + + languages := environment.GetLanguages() + languages = strings.ReplaceAll(languages, "\\n", "\n") + langs := []string{} + if err := yaml.Unmarshal([]byte(languages), &langs); err != nil { + fmt.Println("No language provided in github actions config.") + } + if len(langs) > 0 { + request.Tags["language"] = langs[0] + } + + if os.Getenv("GITHUB_REPOSITORY") != "" { + request.Tags["gh_repo"] = strings.Split(os.Getenv("GITHUB_REPOSITORY"), "/")[0] + } + + body, err := json.Marshal(&request) + if err != nil { + return err + } + + baseURL := os.Getenv("SPEAKEASY_SERVER_URL") + if baseURL == "" { + baseURL = defaultAPIURL + } + + req, err := http.NewRequest("POST", baseURL+"/v1/log/proxy", bytes.NewBuffer(body)) + if err != nil { + return err + } + + req.Header.Set("Content-Type", "application/json") + req.Header.Set("X-Api-Key", key) + + client := &http.Client{ + Timeout: time.Second * 5, + } + resp, err := client.Do(req) + if err != nil { + fmt.Print("failure sending log to speakeasy.") + return nil + } + + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + fmt.Printf("failure sending log to speakeasy with status %s.", resp.Status) + } + + return nil +} diff --git a/internal/actions/suggest.go b/internal/actions/suggest.go index 85d8ca91..0c5cc296 100644 --- a/internal/actions/suggest.go +++ b/internal/actions/suggest.go @@ -2,6 +2,7 @@ package actions import ( "fmt" + "github.com/speakeasy-api/sdk-generation-action/internal/cli" "github.com/speakeasy-api/sdk-generation-action/internal/document" "github.com/speakeasy-api/sdk-generation-action/internal/environment" @@ -15,7 +16,7 @@ func Suggest() error { return err } - err = cli.Download(environment.GetPinnedSpeakeasyVersion(), g) + _, err = cli.Download(environment.GetPinnedSpeakeasyVersion(), g) if err != nil { return err } diff --git a/internal/actions/validate.go b/internal/actions/validate.go index d214fc47..9f28573f 100644 --- a/internal/actions/validate.go +++ b/internal/actions/validate.go @@ -15,7 +15,8 @@ func Validate() error { return err } - if err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g); err != nil { + resolvedVersion, err := cli.Download(environment.GetPinnedSpeakeasyVersion(), g) + if err != nil { return err } @@ -28,7 +29,8 @@ func Validate() error { docPathPrefix += "/" } if err := setOutputs(map[string]string{ - "openapi_doc": strings.TrimPrefix(docPath, docPathPrefix), + "resolved_speakeasy_version": resolvedVersion, + "openapi_doc": strings.TrimPrefix(docPath, docPathPrefix), }); err != nil { logging.Debug("failed to set outputs: %v", err) } diff --git a/internal/cli/speakeasy.go b/internal/cli/speakeasy.go index fa737d00..3a5cd8ba 100644 --- a/internal/cli/speakeasy.go +++ b/internal/cli/speakeasy.go @@ -21,7 +21,7 @@ type Git interface { GetDownloadLink(version string) (string, string, error) } -func Download(pinnedVersion string, g Git) error { +func Download(pinnedVersion string, g Git) (string, error) { if pinnedVersion == "" { pinnedVersion = "latest" } @@ -36,30 +36,30 @@ func Download(pinnedVersion string, g Git) error { link, version, err := g.GetDownloadLink(version) if err != nil { - return err + return version, err } fmt.Println("Downloading speakeasy cli version: ", version) downloadPath := filepath.Join(os.TempDir(), "speakeasy"+path.Ext(link)) if err := download.DownloadFile(link, downloadPath, "", ""); err != nil { - return fmt.Errorf("failed to download speakeasy cli: %w", err) + return version, fmt.Errorf("failed to download speakeasy cli: %w", err) } defer os.Remove(downloadPath) baseDir := environment.GetBaseDir() if err := extract(downloadPath, filepath.Join(baseDir, "bin")); err != nil { - return fmt.Errorf("failed to extract speakeasy cli: %w", err) + return version, fmt.Errorf("failed to extract speakeasy cli: %w", err) } if err := os.Chmod(filepath.Join(baseDir, "bin", "speakeasy"), 0o755); err != nil { - return fmt.Errorf("failed to set permissions on speakeasy cli: %w", err) + return version, fmt.Errorf("failed to set permissions on speakeasy cli: %w", err) } fmt.Println("Extracted speakeasy cli to: ", filepath.Join(baseDir, "bin")) - return nil + return version, nil } func runSpeakeasyCommand(args ...string) (string, error) { diff --git a/internal/environment/environment.go b/internal/environment/environment.go index d59b33fc..0179688f 100644 --- a/internal/environment/environment.go +++ b/internal/environment/environment.go @@ -26,6 +26,7 @@ const ( ActionFinalizeSuggestion Action = "finalize-suggestion" ActionFinalizeDocs Action = "finalize-docs" ActionRelease Action = "release" + ActionLog Action = "log" ) const ( diff --git a/main.go b/main.go index 064a84d4..be367e55 100644 --- a/main.go +++ b/main.go @@ -49,6 +49,8 @@ func main() { err = actions.FinalizeDocs() case environment.ActionRelease: err = actions.Release() + case environment.ActionLog: + err = actions.LogActionResult() } if err != nil { From ced30c34539416f378ad61fd2c191da511550558 Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Thu, 16 Nov 2023 15:19:35 -0800 Subject: [PATCH 2/7] feat: logging in github actions --- .github/workflows/sdk-generation.yaml | 2 ++ internal/actions/log.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index 5a336022..dbcb2837 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -192,6 +192,8 @@ jobs: validate: name: Validate OpenAPI Document runs-on: ubuntu-latest + outputs: + resolved_speakeasy_version: ${{ steps.validate.outputs.resolved_speakeasy_version }} steps: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 diff --git a/internal/actions/log.go b/internal/actions/log.go index a0c07bbb..89742ae4 100644 --- a/internal/actions/log.go +++ b/internal/actions/log.go @@ -32,7 +32,7 @@ type logProxyEntry struct { func LogActionResult() error { key := os.Getenv("SPEAKEASY_API_KEY") if key == "" { - return fmt.Errorf("no speakeasy api key available") + return fmt.Errorf("no speakeasy api key available.") } logLevel := logProxyLevelInfo From 9f3ebe21e53e81c4e9f1d23decc4f4a026187507 Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Thu, 16 Nov 2023 15:23:55 -0800 Subject: [PATCH 3/7] feat: logging in github actions --- .github/workflows/sdk-generation.yaml | 278 +++++++++++++++++++++++++- action.yml | 2 +- 2 files changed, 275 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index dbcb2837..98411784 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -198,7 +198,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: validate - uses: speakeasy-api/sdk-generation-action@v14.34 + uses: speakeasy-api/sdk-generation-action@v14.35 with: speakeasy_version: ${{ inputs.speakeasy_version }} openapi_doc_location: ${{ inputs.openapi_doc_location }} @@ -229,7 +229,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.34 + uses: speakeasy-api/sdk-generation-action@v14.35 with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -274,7 +274,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: generate - uses: speakeasy-api/sdk-generation-action@v14.34 + uses: speakeasy-api/sdk-generation-action@v14.35 with: speakeasy_version: ${{ inputs.speakeasy_version }} openapi_doc_location: ${{ inputs.openapi_doc_location }} @@ -310,6 +310,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-go: if: ${{ needs.generate.outputs.go_regenerated == 'true' }} name: Compile Go SDK @@ -337,6 +352,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-terraform: if: ${{ needs.generate.outputs.terraform_regenerated == 'true' }} name: Compile Terraform Provider @@ -366,6 +396,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-java: if: ${{ needs.generate.outputs.java_regenerated == 'true' }} name: Compile Java SDK @@ -395,6 +440,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-python: if: ${{ needs.generate.outputs.python_regenerated == 'true' }} name: Compile Python SDK @@ -427,6 +487,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-typescript: if: ${{ needs.generate.outputs.typescript_regenerated == 'true' }} name: Compile Typescript SDK @@ -459,6 +534,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-php: if: ${{ needs.generate.outputs.php_regenerated == 'true' }} name: Compile PHP SDK @@ -488,6 +578,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-ruby: if: ${{ needs.generate.outputs.ruby_regenerated == 'true' }} name: Compile Ruby SDK @@ -516,6 +621,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-csharp: if: ${{ needs.generate.outputs.csharp_regenerated == 'true' }} name: Compile C# SDK @@ -547,6 +667,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-swift: if: ${{ needs.generate.outputs.swift_regenerated == 'true' }} name: Compile Swift SDK @@ -574,6 +709,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" compile-unity: if: ${{ needs.generate.outputs.unity_regenerated == 'true' }} name: Compile Unity SDK @@ -605,6 +755,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" finalize: name: Finalize SDK if: | @@ -640,7 +805,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: Finalize - uses: speakeasy-api/sdk-generation-action@v14.34 + uses: speakeasy-api/sdk-generation-action@v14.35 with: github_access_token: ${{ secrets.github_access_token }} languages: ${{ inputs.languages }} @@ -669,6 +834,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" publish-pypi: if: ${{ always() && needs.generate.outputs.python_regenerated == 'true' && inputs.publish_python == 'true' && inputs.mode != 'pr' }} name: Publish Python SDK @@ -709,6 +889,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" publish-npm: if: ${{ always() && needs.generate.outputs.typescript_regenerated == 'true' && inputs.publish_typescript == 'true' && inputs.mode != 'pr' }} name: Publish Typescript SDK @@ -745,6 +940,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" publish-java: if: ${{ always() && needs.finalize.generate.java_regenerated == 'true' && inputs.publish_java == 'true' && inputs.mode != 'pr' }} name: Publish Java SDK @@ -786,6 +996,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" publish-gems: if: ${{ always() && needs.generate.outputs.ruby_regenerated == 'true' && inputs.publish_ruby == 'true' && inputs.mode != 'pr' }} name: Publish Ruby SDK @@ -827,6 +1052,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" publish-nuget: if: ${{ always() && needs.generate.outputs.csharp_regenerated == 'true' && inputs.publish_csharp == 'true' && inputs.mode != 'pr' }} name: Publish C# SDK @@ -858,6 +1098,21 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" publish-packagist: if: ${{ always() && needs.generate.outputs.php_regenerated == 'true' && inputs.publish_php == 'true' && inputs.mode != 'pr' }} name: Publish PHP SDK @@ -887,3 +1142,18 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + - id: log + uses: speakeasy-api/sdk-generation-action@v14.35 + with: + speakeasy_version: ${{ inputs.speakeasy_version }} + github_access_token: ${{ secrets.github_access_token }} + action: log + speakeasy_api_key: ${{ secrets.speakeasy_api_key }} + speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + languages: ${{ inputs.languages }} + env: + GH_ACTION_RESULT: ${{ job.status }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + GH_ACTION_VERSION: "v14" + GH_ACTION_STEP: ${{ github.job }} + TARGET: "sdk" diff --git a/action.yml b/action.yml index 7f5f497e..00a9d562 100644 --- a/action.yml +++ b/action.yml @@ -209,7 +209,7 @@ outputs: description: "The location of the OpenAPI document used for generation" runs: using: "docker" - image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v14.34" + image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v14.35" env: SPEAKEASY_API_KEY: ${{ inputs.speakeasy_api_key }} SPEAKEASY_SERVER_URL: ${{ inputs.speakeasy_server_url }} From 5838e84383c0d9128352f12897f6070e3b4c12f5 Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Thu, 16 Nov 2023 15:35:57 -0800 Subject: [PATCH 4/7] update --- .github/workflows/sdk-generation.yaml | 57 ++++++++++++++++++--------- internal/actions/log.go | 2 +- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index 98411784..3bc2b1bd 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -230,6 +230,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -239,7 +240,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -312,6 +313,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -321,7 +323,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -354,6 +356,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -363,7 +366,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -398,6 +401,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -407,7 +411,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -442,6 +446,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -451,7 +456,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -489,6 +494,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -498,7 +504,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -536,6 +542,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -545,7 +552,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -580,6 +587,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -589,7 +597,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -623,6 +631,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -632,7 +641,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -669,6 +678,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -678,7 +688,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -711,6 +721,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -720,7 +731,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -757,6 +768,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -766,7 +778,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -836,6 +848,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -845,7 +858,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -891,6 +904,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -900,7 +914,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -942,6 +956,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -951,7 +966,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -998,6 +1013,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -1007,7 +1023,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1054,6 +1070,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -1063,7 +1080,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1100,6 +1117,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -1109,7 +1127,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1144,6 +1162,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log uses: speakeasy-api/sdk-generation-action@v14.35 + if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} @@ -1153,7 +1172,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validation.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" diff --git a/internal/actions/log.go b/internal/actions/log.go index 89742ae4..74a2b09d 100644 --- a/internal/actions/log.go +++ b/internal/actions/log.go @@ -69,7 +69,7 @@ func LogActionResult() error { } if os.Getenv("GITHUB_REPOSITORY") != "" { - request.Tags["gh_repo"] = strings.Split(os.Getenv("GITHUB_REPOSITORY"), "/")[0] + request.Tags["gh_organization"] = strings.Split(os.Getenv("GITHUB_REPOSITORY"), "/")[0] } body, err := json.Marshal(&request) From e35bb7e7ff673c6bd3e4aa00290d2502da395822 Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Thu, 16 Nov 2023 15:47:38 -0800 Subject: [PATCH 5/7] update --- .github/workflows/sdk-generation.yaml | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index 3bc2b1bd..f4cb07d5 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -323,7 +323,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -366,7 +366,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -411,7 +411,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -456,7 +456,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -504,7 +504,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -552,7 +552,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -597,7 +597,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -641,7 +641,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -688,7 +688,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -731,7 +731,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -778,7 +778,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -858,7 +858,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -914,7 +914,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -966,7 +966,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1023,7 +1023,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1080,7 +1080,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1127,7 +1127,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1172,7 +1172,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ steps.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" From 83d1bc53ad2914f795fc5ffdbf7926d480114df2 Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Thu, 16 Nov 2023 16:00:39 -0800 Subject: [PATCH 6/7] update --- .github/workflows/sdk-generation.yaml | 74 ++++++++++++--------------- action.yml | 2 +- internal/actions/log.go | 7 ++- 3 files changed, 40 insertions(+), 43 deletions(-) diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index f4cb07d5..78483eb6 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -198,7 +198,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: validate - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 with: speakeasy_version: ${{ inputs.speakeasy_version }} openapi_doc_location: ${{ inputs.openapi_doc_location }} @@ -229,7 +229,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -271,11 +271,12 @@ jobs: unity_directory: ${{ steps.generate.outputs.unity_directory }} branch_name: ${{ steps.generate.outputs.branch_name }} previous_gen_version: ${{ steps.generate.outputs.previous_gen_version }} + resolved_speakeasy_version: ${{ steps.generate.outputs.resolved_speakeasy_version }} steps: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: generate - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 with: speakeasy_version: ${{ inputs.speakeasy_version }} openapi_doc_location: ${{ inputs.openapi_doc_location }} @@ -312,7 +313,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -323,7 +324,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ steps.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -355,7 +356,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -366,7 +367,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -400,7 +401,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -411,7 +412,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -445,7 +446,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -456,7 +457,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -493,7 +494,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -504,7 +505,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -541,7 +542,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -552,7 +553,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -586,7 +587,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -597,7 +598,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -630,7 +631,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -641,7 +642,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -677,7 +678,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -688,7 +689,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -720,7 +721,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -731,7 +732,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -767,7 +768,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -778,7 +779,7 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} + RESOLVED_SPEAKEASY_VERSION: ${{ needs.generate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -817,7 +818,7 @@ jobs: - name: Tune GitHub-hosted runner network uses: smorimoto/tune-github-hosted-runner-network@v1 - id: Finalize - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 with: github_access_token: ${{ secrets.github_access_token }} languages: ${{ inputs.languages }} @@ -847,7 +848,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -858,7 +859,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -903,7 +903,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -914,7 +914,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -955,7 +954,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -966,7 +965,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1012,7 +1010,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -1023,7 +1021,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1069,7 +1066,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -1080,7 +1077,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1116,7 +1112,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -1127,7 +1123,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" @@ -1161,7 +1156,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - id: log - uses: speakeasy-api/sdk-generation-action@v14.35 + uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} @@ -1172,7 +1167,6 @@ jobs: languages: ${{ inputs.languages }} env: GH_ACTION_RESULT: ${{ job.status }} - RESOLVED_SPEAKEASY_VERSION: ${{ needs.validate.outputs.resolved_speakeasy_version }} GH_ACTION_VERSION: "v14" GH_ACTION_STEP: ${{ github.job }} TARGET: "sdk" diff --git a/action.yml b/action.yml index 00a9d562..b7f248b5 100644 --- a/action.yml +++ b/action.yml @@ -209,7 +209,7 @@ outputs: description: "The location of the OpenAPI document used for generation" runs: using: "docker" - image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v14.35" + image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v14" env: SPEAKEASY_API_KEY: ${{ inputs.speakeasy_api_key }} SPEAKEASY_SERVER_URL: ${{ inputs.speakeasy_server_url }} diff --git a/internal/actions/log.go b/internal/actions/log.go index 74a2b09d..f4c9e6af 100644 --- a/internal/actions/log.go +++ b/internal/actions/log.go @@ -48,8 +48,7 @@ func LogActionResult() error { Source: "gh_action", Tags: map[string]interface{}{ "target": os.Getenv("TARGET"), - "speakeasy_version": os.Getenv("RESOLVED_SPEAKEASY_VERSION"), - "gh_repo": os.Getenv("GITHUB_REPOSITORY"), + "gh_repository": fmt.Sprintf("https://github.com/%s", os.Getenv("GITHUB_REPOSITORY")), "gh_action_version": os.Getenv("GH_ACTION_VERSION"), "gh_action_step": os.Getenv("GH_ACTION_STEP"), "gh_action_result": os.Getenv("GH_ACTION_RESULT"), @@ -72,6 +71,10 @@ func LogActionResult() error { request.Tags["gh_organization"] = strings.Split(os.Getenv("GITHUB_REPOSITORY"), "/")[0] } + if os.Getenv("RESOLVED_SPEAKEASY_VERSION") != "" { + request.Tags["speakeasy_version"] = os.Getenv("RESOLVED_SPEAKEASY_VERSION") + } + body, err := json.Marshal(&request) if err != nil { return err From eb73a15b4b3e2670b6a3e42613d6acd0dae5ed46 Mon Sep 17 00:00:00 2001 From: Ryan Albert Date: Fri, 17 Nov 2023 10:38:47 -0800 Subject: [PATCH 7/7] feat: update --- .github/workflows/sdk-generation.yaml | 76 +++++++++++++-------------- internal/actions/log.go | 15 +++--- internal/environment/environment.go | 2 +- main.go | 2 +- 4 files changed, 49 insertions(+), 46 deletions(-) diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index 78483eb6..910f0ea8 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -228,13 +228,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -312,13 +312,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -355,13 +355,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -400,13 +400,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -445,13 +445,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -493,13 +493,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -541,13 +541,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -586,13 +586,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -630,13 +630,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -677,13 +677,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -720,13 +720,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -767,13 +767,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -847,13 +847,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -902,13 +902,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -953,13 +953,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -1009,13 +1009,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -1065,13 +1065,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -1111,13 +1111,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} @@ -1155,13 +1155,13 @@ jobs: footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Run>" env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - id: log + - id: log-result uses: speakeasy-api/sdk-generation-action@v14 if: always() with: speakeasy_version: ${{ inputs.speakeasy_version }} github_access_token: ${{ secrets.github_access_token }} - action: log + action: log-result speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} languages: ${{ inputs.languages }} diff --git a/internal/actions/log.go b/internal/actions/log.go index f4c9e6af..9bbd2bf5 100644 --- a/internal/actions/log.go +++ b/internal/actions/log.go @@ -29,10 +29,11 @@ type logProxyEntry struct { Tags map[string]interface{} `json:"tags"` } -func LogActionResult() error { +func LogActionResult() { key := os.Getenv("SPEAKEASY_API_KEY") if key == "" { - return fmt.Errorf("no speakeasy api key available.") + fmt.Print("no SPEAKEASY_API_KEY provided.") + return } logLevel := logProxyLevelInfo @@ -77,7 +78,8 @@ func LogActionResult() error { body, err := json.Marshal(&request) if err != nil { - return err + fmt.Print("failure sending log to speakeasy.") + return } baseURL := os.Getenv("SPEAKEASY_SERVER_URL") @@ -87,7 +89,8 @@ func LogActionResult() error { req, err := http.NewRequest("POST", baseURL+"/v1/log/proxy", bytes.NewBuffer(body)) if err != nil { - return err + fmt.Print("failure sending log to speakeasy.") + return } req.Header.Set("Content-Type", "application/json") @@ -99,7 +102,7 @@ func LogActionResult() error { resp, err := client.Do(req) if err != nil { fmt.Print("failure sending log to speakeasy.") - return nil + return } defer resp.Body.Close() @@ -108,5 +111,5 @@ func LogActionResult() error { fmt.Printf("failure sending log to speakeasy with status %s.", resp.Status) } - return nil + return } diff --git a/internal/environment/environment.go b/internal/environment/environment.go index 0179688f..3bd054f0 100644 --- a/internal/environment/environment.go +++ b/internal/environment/environment.go @@ -26,7 +26,7 @@ const ( ActionFinalizeSuggestion Action = "finalize-suggestion" ActionFinalizeDocs Action = "finalize-docs" ActionRelease Action = "release" - ActionLog Action = "log" + ActionLog Action = "log-result" ) const ( diff --git a/main.go b/main.go index be367e55..9776e622 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,7 @@ func main() { case environment.ActionRelease: err = actions.Release() case environment.ActionLog: - err = actions.LogActionResult() + actions.LogActionResult() } if err != nil {