{"id":17602741,"url":"https://github.com/ahume/github-deployment-resource","last_synced_at":"2025-10-08T23:54:03.223Z","repository":{"id":57494767,"uuid":"75308371","full_name":"ahume/github-deployment-resource","owner":"ahume","description":"A concourse resource for github deployments","archived":false,"fork":false,"pushed_at":"2022-08-11T15:19:43.000Z","size":893,"stargazers_count":10,"open_issues_count":7,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T14:51:10.948Z","etag":null,"topics":["concourse","concourse-resource","deployment"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahume.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":"2016-12-01T15:55:50.000Z","updated_at":"2023-03-22T18:25:10.000Z","dependencies_parsed_at":"2022-08-28T19:40:18.571Z","dependency_job_id":null,"html_url":"https://github.com/ahume/github-deployment-resource","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahume%2Fgithub-deployment-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahume%2Fgithub-deployment-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahume%2Fgithub-deployment-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahume%2Fgithub-deployment-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahume","download_url":"https://codeload.github.com/ahume/github-deployment-resource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251675574,"owners_count":21625843,"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":["concourse","concourse-resource","deployment"],"created_at":"2024-10-22T13:24:05.898Z","updated_at":"2025-10-08T23:53:58.202Z","avatar_url":"https://github.com/ahume.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Deployment Resource\n\nFetches and creates GitHub Deployments and Deployment Statuses. For more about Github Deployments\nsee the [API documentation](https://developer.github.com/v3/repos/deployments/).\n\n## Source Configuration\n\n* `user`: *Required.* The GitHub username or organization name for the\n  repository that you are deploying.\n\n* `repository`: *Required.* The repository name that you are deploying.\n\n* `access_token`: *Required.* Used for accessing deployment data and creating deployments\n  and deployment statuses.\n\n* `github_api_url`: *Optional.* If you use a non-public GitHub deployment then\n  you can set your API URL here.\n\n* `environments`: *Optional.* A list of environments to get versions for.\n\n### Example\n\n``` yaml\nresource_types:\n  - name: github-deployment\n    type: docker-image\n    source:\n      repository: andyhume/github-deployment-resource\n      tag: \"v0.8.0\"\n      \nresources:\n  - name: deployment\n    type: github-deployment\n    source:\n      user: BrandwatchLtd\n      repository: analytics\n      access_token: abcdef1234567890\n```\n\n``` yaml\n- get: deployment\n```\n\n``` yaml\n- put: deployment\n  params:\n    id:\n      file: deployment/id # path to a file containing the deployment ID\n    state: success\n```\n\n## Behavior\n\n### `check`: Check for Deployments\n\n`/check` always returns the single latest deployment. It assumes that any preceding deployments\nare invalidated by the existence of a later deployment.\n\n### `in`: Fetch Deployment\n\nFetches the latest deployment and creates the following files:\n\n* `id` containing the `id` of the deployment being fetched.\n* `ref` containting the name of the `ref` the deployment is relating to. A branch, tag, or SHA.\n* `sha` containg the SHA that was recorded at deployment creation time.\n* `task` containing the name of the task for the deployment.\n* `environment` containing the name of the environment that is being deployed to.\n* `description` containing the description of the deployment\n* `deploymentJSON` containing the full JSON of the deployment as received from the API.\n\n\n### `out`: Create a Deployment or DeploymentStatus\n\nCreate a new Deployment, or update a given Deployment with a new DeploymentStatus\n\n#### Parameters\n\n* `type`: *Optional.* Either `deployment` or `status`. Defaults to `status`.\n\n##### If type=status\n\n* `id`: *Required.* The ID of the deployment to update with the new status.\n  NB: You'll most likely want to reference a file with this ID stored in (see below).\n\n* `state`: *Required.*  The state of the new deployment status.\n  Must be one of `pending`, `success`, `error`, `inactive`, or `failure`.\n\n##### If type=deployment\n\n* `ref`: *Optional.* The ref of the deployment. A branch name, a tag, or SHA.\n\n* `environment`: *Optional.* The name of the environment that is being deployed to.\n\n* `description`: *Optional.* The description of the deployment.\n\n* `payload`: *Optional.* Additional data about the deployment.\n\n* `payload_path`: *Optional.* Path to a file containing additional JSON data to add to the payload.\n\nNB: If there are duplicate keys in data from `payload` and `payload_path`, then the data from\n`payload_path` takes precedence.\n\n* `task`: *Optional.* The name of the task for the deployment.\n\n##### Reading values from files\n\nAll of the above parameters can be used to pass the name of a file to read the applicable value\nfrom. For example...\n\n```yaml\n- put: deployment\n  params:\n    id:\n      file: path/to/the/id/file\n    state: success\n    description:\n      file: path/to/the/description\n```\nThe above configuration, would read in the `id` and `description` values from files, but use\nthe `state` value which has been passed in directly as a string.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahume%2Fgithub-deployment-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahume%2Fgithub-deployment-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahume%2Fgithub-deployment-resource/lists"}