{"id":20725211,"url":"https://github.com/sighupio/drone-github-release","last_synced_at":"2025-08-24T11:12:23.475Z","repository":{"id":49239170,"uuid":"379237836","full_name":"sighupio/drone-github-release","owner":"sighupio","description":"Extension of https://github.com/drone-plugins/drone-github-release","archived":false,"fork":false,"pushed_at":"2021-06-22T14:38:23.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-11T08:50:26.029Z","etag":null,"topics":["drone","github","plugin","release"],"latest_commit_sha":null,"homepage":"https://sighup.io","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sighupio.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":"2021-06-22T11:00:44.000Z","updated_at":"2021-06-22T15:01:49.000Z","dependencies_parsed_at":"2022-09-10T03:54:16.668Z","dependency_job_id":null,"html_url":"https://github.com/sighupio/drone-github-release","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sighupio/drone-github-release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighupio%2Fdrone-github-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighupio%2Fdrone-github-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighupio%2Fdrone-github-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighupio%2Fdrone-github-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sighupio","download_url":"https://codeload.github.com/sighupio/drone-github-release/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighupio%2Fdrone-github-release/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271851636,"owners_count":24834024,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["drone","github","plugin","release"],"created_at":"2024-11-17T04:17:55.788Z","updated_at":"2025-08-24T11:12:23.433Z","avatar_url":"https://github.com/sighupio.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drone GitHub Release Plugin\n\nThis project hosts a Container Image definition that fits on top of the official\n[GitHub Release Drone Plugin](https://github.com/drone-plugins/drone-github-release).\n\n## Motivation\n\nA drone plugin is just a container image with some software that receives environment variables, then produces\nan output. You can *(potentially)*[**(1)**](#potentially) use a plugin in two different ways:\n\n[As a plugin](http://plugins.drone.io/drone-plugins/drone-github-release/):\n\n```yaml\n---\nkind: pipeline\nname: Release\n\nsteps:\n- name: release\n    image: plugins/github-release\n    settings:\n      GITHUB_TOKEN:\n        from_secret: GITHUB_TOKEN\n    when:\n      event:\n        - tag\n```\n\nAs a regular step:\n\n```yaml\n---\nkind: pipeline\nname: Release\n\nsteps:\n- name: release\n    image: plugins/github-release\n    environment:\n      GITHUB_TOKEN:\n        from_secret: GITHUB_TOKEN\n    commands:\n      - drone-github-release\n    when:\n      event:\n        - tag\n```\n\n### Potentially?\n\n\u003e Note the environment section cannot expand environment variables or evaluate shell expressions.\n\u003e If you need to construct variables it should be done in the commands section.\n*Source: [https://docs.drone.io/pipeline/environment/syntax/](https://docs.drone.io/pipeline/environment/syntax/)*\n\nIn some scenarios is required to compute some environment variables / settings that depends on other environment\nvariables.\n\nIn order to do something like:\n\n```yaml\nkind: pipeline\nname: Release\n\nsteps:\n  - name: release\n    image: plugins/github-release\n    environment:\n      GITHUB_TOKEN:\n        from_secret: GITHUB_TOKEN\n    commands:\n      - export GITHUB_RELEASE_TITLE=\"Welcome $${DRONE_TAG} release\"\n      - export GITHUB_RELEASE_NOTE=\"docs/releases/$${DRONE_TAG}.md\"\n      - drone-github-release\n    when:\n      event:\n        - tag\n```\n\nIt is required to run the plugin as a regular step to configure these environment variables\nthat are based in the value of `${DRONE_TAG}`.\n\nThe main problem is that a regular step requires the container image to have `/bin/sh` and/or `/bin/bash` installed.\nThis plugins lacks this requirement:\n\n```bash\n$ docker run -it --entrypoint /bin/sh --rm plugins/github-release\ndocker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: \"/bin/sh\": stat /bin/sh: no such file or directory: unknown.\n```\n\nSo in order to solve the issue, we have created this repository that creates a container image starting from\nthe upstream container image but based on `debian:buster`. This adds a proper shell enabling the usage of the plugin\nalso as a regular drone pipeline step.\n\n```yaml\nkind: pipeline\nname: Release\n\nsteps:\n  - name: release\n    image: registry.sighup.io/fury/drone-github-release:latest # This is the new image\n    environment:\n      GITHUB_TOKEN:\n        from_secret: GITHUB_TOKEN\n    commands:\n      - export GITHUB_RELEASE_TITLE=\"Welcome $${DRONE_TAG} release\"\n      - export GITHUB_RELEASE_NOTE=\"docs/releases/$${DRONE_TAG}.md\"\n      - drone-github-release\n    when:\n      event:\n        - tag\n```\n\n### Dockerfile\n\nYou can check the resulting [Dockerfile here](Dockerfile).\n\n```Dockerfile\nFROM plugins/github-release:latest as binary\n\nFROM debian:buster\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    ca-certificates \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\nCOPY --from=binary /bin/drone-github-release /bin/drone-github-release\nENTRYPOINT [ \"/bin/drone-github-release\" ]\n```\n\n## Build\n\nBuild the Docker image with the following command:\n\n```console\ndocker build --tag registry.sighup.io/fury/drone-github-release .\n```\n\n## Usage\n\n### Local\n\n```console\ndocker run --rm \\\n  -e DRONE_BUILD_EVENT=tag \\\n  -e DRONE_REPO_OWNER=octocat \\\n  -e DRONE_REPO_NAME=foo \\\n  -e DRONE_COMMIT_REF=refs/heads/master \\\n  -e PLUGIN_API_KEY=${HOME}/.ssh/id_rsa \\\n  -e PLUGIN_FILES=master \\\n  -v $(pwd):$(pwd) \\\n  -w $(pwd) \\\n  registry.sighup.io/fury/drone-github-release\n```\n\n### Pipeline\n\nYou can follow upstream documentation from [here](http://plugins.drone.io/drone-plugins/drone-github-release/) just\nchanging the `image`:\n\nFrom: `plugins/github-release`, to: **`registry.sighup.io/fury/drone-github-release`**\n\nExamples:\n\nAs a plugin:\n\n```yaml\n---\nkind: pipeline\nname: Release\n\nsteps:\n- name: release\n    image: registry.sighup.io/fury/drone-github-release:latest\n    settings:\n      GITHUB_TOKEN:\n        from_secret: GITHUB_TOKEN\n    when:\n      event:\n        - tag\n```\n\nOr as a regular step:\n\n```yaml\nkind: pipeline\nname: Release\n\nsteps:\n  - name: release\n    image: registry.sighup.io/fury/drone-github-release:latest\n    environment:\n      GITHUB_TOKEN:\n        from_secret: GITHUB_TOKEN\n    commands:\n      - drone-github-release\n    when:\n      event:\n        - tag\n```\n\n## License\n\nRead the [License file](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsighupio%2Fdrone-github-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsighupio%2Fdrone-github-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsighupio%2Fdrone-github-release/lists"}