{"record":{"id":"540fa98e6b0d4187","repo":"hashicorp/packer","slug":"github-actions-environment-variable-not-found","errorCode":null,"errorMessage":"GITHUB_ACTIONS environment variable not found","messagePattern":"GITHUB_ACTIONS environment variable not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/hcp/registry/metadata/cicd.go","lineNumber":16,"sourceCode":"// Copyright IBM Corp. 2024, 2026\n// SPDX-License-Identifier: BUSL-1.1\n\npackage metadata\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\ntype GithubActions struct{}\n\nfunc (g *GithubActions) Detect() error {\n\t_, ok := os.LookupEnv(\"GITHUB_ACTIONS\")\n\tif !ok {\n\t\treturn fmt.Errorf(\"GITHUB_ACTIONS environment variable not found\")\n\t}\n\treturn nil\n}\n\nfunc (g *GithubActions) Details() map[string]interface{} {\n\tenv := make(map[string]interface{})\n\tkeys := []string{\n\t\t\"GITHUB_REPOSITORY\",\n\t\t\"GITHUB_REPOSITORY_ID\",\n\t\t\"GITHUB_WORKFLOW_URL\",\n\t\t\"GITHUB_SHA\",\n\t\t\"GITHUB_REF\",\n\t\t\"GITHUB_ACTOR\",\n\t\t\"GITHUB_ACTOR_ID\",\n\t\t\"GITHUB_TRIGGERING_ACTOR\",\n\t\t\"GITHUB_EVENT_NAME\",\n\t\t\"GITHUB_JOB\",\n\t}","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/internal/hcp/registry/metadata/cicd.go#L1-L34","documentation":"Probe result from the GitHub Actions CI detector (GithubActions.Detect): the GITHUB_ACTIONS env var is absent, so the current process is not running inside GitHub Actions and this metadata provider does not apply.","triggerScenarios":"Thrown at internal/hcp/registry/metadata/cicd.go:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an expected negative detection; the caller should try the next CI provider detector","If you expect GitHub Actions, run the build inside a GitHub workflow runner"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}