{"id":18767755,"url":"https://github.com/lightstep/lightstep-action-predeploy","last_synced_at":"2025-04-13T06:32:28.894Z","repository":{"id":56005238,"uuid":"289106508","full_name":"lightstep/lightstep-action-predeploy","owner":"lightstep","description":"GitHub Action to see service health, reported errors, and on-call information in pull requests.","archived":false,"fork":false,"pushed_at":"2020-12-01T19:07:02.000Z","size":2216,"stargazers_count":14,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T12:13:58.162Z","etag":null,"topics":["github-actions"],"latest_commit_sha":null,"homepage":"https://lightstep.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightstep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-20T20:41:27.000Z","updated_at":"2024-11-13T18:19:33.000Z","dependencies_parsed_at":"2023-01-04T16:47:58.396Z","dependency_job_id":null,"html_url":"https://github.com/lightstep/lightstep-action-predeploy","commit_stats":{"total_commits":44,"total_committers":3,"mean_commits":"14.666666666666666","dds":"0.045454545454545414","last_synced_commit":"22bec553a6d0fb3de5026acb1159085601f76408"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-action-predeploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-action-predeploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-action-predeploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Flightstep-action-predeploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightstep","download_url":"https://codeload.github.com/lightstep/lightstep-action-predeploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674678,"owners_count":21143760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions"],"created_at":"2024-11-07T19:08:27.931Z","updated_at":"2025-04-13T06:32:25.593Z","avatar_url":"https://github.com/lightstep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lightstep-action-predeploy\n\nThe `lightstep/lightstep-action-predeploy` action provides insight into the health of production service(s) during software delivery alongside on-call and error information. \n\nThis Javascript-based action can be used when a pull request is approved by GitHub reviewers and uses APIs to provide a summary of deployment risk ahead of a code change going to a production environment.\n\n:book: [Follow the tutorial on setting up this action on Lightstep's Documentation Portal](https://docs.lightstep.com/paths/git-hub-action-path)\n\n![Example Output in a PR](./example/images/pr-comment.png)\n\n## Requirements\n\n### GitHub\n  * Repository that corresponds to a service running in a production environment\n    * Github action workflow for the repository that uses the Lightstep GitHub action\n    * API token(s) defined as secrets in the repository configuration settings\n    * `.lightstep.yml` configuration file in root directory of repository\n\n### Lightstep\n  * Instrumented service(s) running in a production environment ([create account here](https://app.lightstep.com/signup))\n    * Deployment tracking configured for the service\n    * Streams created for instrumented service\n    * Alert threshold(s) defined for streams\n    * Lightstep [API key](https://docs.lightstep.com/docs/create-and-manage-api-keys)\n\n## Usage\n\nThis action can be run on `ubuntu-latest` GitHub Actions runner as a step in any GitHub Action workflow.\n\nMost users will also want to specify a list of specific conditions to check in the `lightstep.yml` file (see example below).\n\n### Example Workflow\n\nThis workflow uses the action to add a comment to a pull request after a review has been submitted.\n\n👉 *[Try out this workflow on your repository](https://lightstep.github.io/lightstep-action-predeploy/)*\n\n#### `.github/workflows/predeploy.yml`\n\n```yaml\non:\n  pull_request_review:\n    types: [submitted]\n\njobs:\n  deploy_check_job:\n    runs-on: ubuntu-latest\n    name: Verify Pre-Deploy Status\n\n    steps:  \n      # Using checkout is required if reading from a `.lightstep.yml` file in the repo\n      - name: Checkout\n        uses: actions/checkout@v2\n\n      # Run checks and output status as PR comment\n      - name: Lightstep Pre-Deploy Check\n        id: lightstep-predeploy\n        uses: lightstep/lightstep-action-predeploy\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          lightstep_api_key: ${{ secrets.LIGHTSTEP_API_KEY }}\n          pagerduty_api_token: ${{ secrets.PAGERDUTY_API_TOKEN }}\n          rollbar_api_token: ${{ secrets.ROLLBAR_API_TOKEN }}\n```\n\n### Additional Examples\n\nA fully working example is available in the [hipster-shop](https://github.com/lightstep/hipster-shop) repository.\n\n## Inputs\n\nInputs can be specified using any combination of a `.lightstep.yml` file in the root of the repository using the action, as inputs to the action, as environment varables.\n\nAPI keys are always passed as inputs or environment variables.\n\nThe following are **required**:\n\n| Action Input             | `.lightstep.yml`| Env var                   |\n| ------------------------ | --------------- | ------------------------- |\n| `lightstep_organization` | `organization`  | `LIGHTSTEP_ORGANIZATION`  |\n| `lightstep_project`      | `project`       | `LIGHTSTEP_PROJECT`       |\n| `lightstep_api_key`      | N/A             | `LIGHTSTEP_API_KEY`       |\n\nAdditional inputs (_optional_):\n\n| Action Input         | `.lightstep.yml`  | Env var                |\n| -------------------- | ----------------- | ---------------------- | \n| `pagerduty_api_token`| N/A               | `PAGERDUTY_API_TOKEN`  |\n| `rollbar_api_token`  | N/A               | `ROLLBAR_API_TOKEN`    |\n| `rollup_conditions`  | N/A               | N/A                    |\n\n`rollup_conditions` will collapse all conditions to a single row of the output table if set to `true`.\n\n## `.lightstep.yml` Configuration\n\nThis action reads configuration from a special file you add to the root of your repository.\n\nHere's an example `.lightstep.yml` file that specifies PagerDuty and Rollbar-specific configuration: \n\nOptionally, you can specify a list of condition ids to check status of the project with. The default behavior is to check *all* conditions on the project.\n\n```yaml\norganization: -13ac9ef7\nproject: hipster-shop\n\n# optional - specifiy specific conditions to check\nconditions:\n  - YfDzWxGL\n  - gLFxv0B1\n\n# optional integrations\nintegrations:\n  rollbar:\n    environment: production\n    account: lightstep\n    project: hipster-shop\n  pagerduty:\n    service: PA0B3RR\n```\n\n## Outputs\n\n* `lightstep_organization` - Lightstep organization associated with an account\n\n* `lightstep_project` - Lightstep project associated with an organization\n\n* `lightstep_predeploy_md` - Markdown-formatted summary of pre-deploy checks\n\n* `lightstep_predeploy_status` - Status of pre-deploy checks: `ok`, `warn`, `error` or `unknown`\n\n## Notes\n\nThis action does not automatically generate a pull request comment after running.\n\nTo add the output of this action to generate a pull request comment, use the `lightstep_predeploy_md` output with another action like [`unsplash/comment-on-pr`](https://github.com/unsplash/comment-on-pr/).\n\n## License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Flightstep-action-predeploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightstep%2Flightstep-action-predeploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Flightstep-action-predeploy/lists"}