{"id":7743534,"name":"formsort/action-heroku-deploy","ecosystem":"actions","description":"Deploy to Heroku with a repo tarball","homepage":null,"licenses":"apache-2.0","normalized_licenses":["Apache-2.0"],"repository_url":"https://github.com/formsort/action-heroku-deploy","keywords_array":[],"namespace":"formsort","versions_count":1,"first_release_published_at":"2022-05-14T17:24:13.000Z","latest_release_published_at":"2022-05-14T17:24:13.000Z","latest_release_number":"v1","latest_published_release_number":null,"last_synced_at":"2026-09-15T16:07:23.574Z","created_at":"2023-05-17T08:44:45.467Z","updated_at":"2026-09-21T23:38:17.050Z","registry_url":"https://github.com/formsort/action-heroku-deploy","install_command":null,"documentation_url":null,"metadata":{"name":"Zero-waste Heroku Deploy","description":"Deploy to Heroku with a repo tarball","inputs":{"github_repo":{"description":"GitHub repo name with owner (eg. formsort/formsort)","required":true},"github_token":{"description":"GITHUB_TOKEN","required":true},"heroku_api_key":{"description":"API Key for the Heroku account that will perform the deploy","required":true},"heroku_app_name":{"description":"Name of the Heroku app to be deployed","required":true},"heroku_app_version":{"description":"The new version of the app to be deployed. Will fall back to `inputs.ref` if not provided.","required":false},"ref":{"description":"Git ref to deploy to Heroku","required":true,"default":""},"only_promotion":{"description":"Only allow promoting from a pipeline (rather than a direct build)","required":true,"default":"false"}},"outputs":{"source_tarball":{"description":"The URL of the source tarball used to create the build","value":"${{ steps.source_blob.outputs.link }}"},"build":{"description":"The JSON blob of the build created by Heroku","value":"${{ steps.create_build.outputs.build }}"},"build_id":{"description":"The id of the build created by Heroku","value":"${{ steps.create_build.outputs.id }}"},"build_log":{"description":"The logs for the build created by Heroku","value":"${{ steps.build_logs.outputs.text }}"},"release":{"description":"The JSON blob of the release created by Heroku","value":"${{ steps.get_release.outputs.release }}"},"release_id":{"description":"The id of the release created by Heroku","value":"${{ steps.get_release.outputs.id }}"},"release_log":{"description":"The logs for the release created by Heroku","value":"${{ steps.release_logs.outputs.text }}"}},"runs":{"using":"composite","steps":[{"id":"pipeline_check","name":"Check if app is part of a pipeline_check","continue-on-error":"${{ inputs.only_promotion == 'false' }}","shell":"bash","run":"# Try to determine if the app is part of a pipeline *and* it is in production stage\n# If the app is NOT part of any pipelines, this endpoint will return 404, causing `curl`\n# to exit with a failure code (see the `-f` flag) and will fail the rest of the step.\n# This is why we have `continue-on-error` set to true above.\npipeline_couplings=$(\\\n  curl -fsS 'https://api.heroku.com/apps/${{ inputs.heroku_app_name }}/pipeline-couplings' \\\n    -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n    -H 'Accept: application/vnd.heroku+json; version=3' \\\n)\nif [[ $(echo \"$pipeline_couplings\" | jq -rc .stage) != 'production' ]]; then\n  exit;\nfi\n\npipeline_id=$(echo \"$pipeline_couplings\" | jq -rc .pipeline.id)\n# Get all the apps in the pipeline our app is associated with\nall_pipeline_couplings=$(\\\n  curl -fsS \"https://api.heroku.com/pipelines/$pipeline_id/pipeline-couplings\" \\\n    -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n    -H 'Accept: application/vnd.heroku+json; version=3' \\\n)\n# Get the app id for the app designated as \"staging\" from the pipeline. Remember, we expected the\n# app we are deploying to be the `production` app and we can only promote to that from `staging`.\nstaging_app_id=$(echo \"$all_pipeline_couplings\" | jq -rc '.[] | select(.stage == \"staging\").app.id')\n\n# Get the latest builds on pipeline to see if there's a successful build associated with the\n# staging app we just found above AND the SHA we are trying to deploy for.\nlatest_pipeline_builds=$(\\\n  curl -fsS \"https://api.heroku.com/pipelines/$pipeline_id/latest-builds\" \\\n    -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n    -H 'Accept: application/vnd.heroku+json; version=3' \\\n)\n\napplicable_build_id=$(\\\n  echo \"$latest_pipeline_builds\" | \\\n  jq -rc '.[] | select(.app.id == \"'\"$staging_app_id\"'\" and .status == \"succeeded\" and .source_blob.version == \"${{ inputs.ref }}\").id')\n\n# IF we have a build on staging with the SHA we are trying to deploy across latest builds,\n# set the outputs so the next steps will try to promote instead of doing a full build \u0026 release\nif [[ -n \"$applicable_build_id\" ]]; then\n  echo \"pipeline_id=$pipeline_id\" \u003e\u003e $GITHUB_OUTPUT\n  echo \"source_app_id=$staging_app_id\" \u003e\u003e $GITHUB_OUTPUT\n  target_app_id=$(echo \"$pipeline_couplings\" | jq -rc .app.id)\n  echo \"target_app_id=$target_app_id\" \u003e\u003e $GITHUB_OUTPUT\nfi\n"},{"id":"source_blob","name":"Get link to source blob","if":"inputs.only_promotion == 'false' \u0026\u0026 !steps.pipeline_check.outputs.pipeline_id\n","shell":"bash","run":"echo \"link=$(\\\n  curl -fsS 'https://api.github.com/repos/${{ inputs.github_repo }}/tarball/${{ inputs.ref }}' \\\n  -H 'Authorization: token ${{ inputs.github_token }}' -D - -o /dev/null \\\n  | awk -v RS='\\r\\n' -v OFS='' -F'location: ' '$2 {print $2}' \\\n)\" \u003e\u003e $GITHUB_OUTPUT\n"},{"id":"create_build","name":"Create Heroku build","if":"inputs.only_promotion == 'false' \u0026\u0026 !steps.pipeline_check.outputs.pipeline_id","shell":"bash","run":"heroku_build=$(curl -fsS -X POST 'https://api.heroku.com/apps/${{ inputs.heroku_app_name }}/builds' \\\n  -d '{\"source_blob\":{\"url\":\"${{ steps.source_blob.outputs.link }}\", \"version\": \"${{ inputs.heroku_app_version || inputs.ref }}\"}}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n  -H 'Accept: application/vnd.heroku+json; version=3' \\\n  | jq -rc . \\\n)\necho \"build=$heroku_build\" \u003e\u003e $GITHUB_OUTPUT\n\nbuild_id=$(echo \"$heroku_build\" | jq -rc .id)\necho \"id=$build_id\" \u003e\u003e $GITHUB_OUTPUT\n"},{"id":"build_logs","name":"Heroku build logs","if":"steps.create_build.outputs.build","shell":"bash","run":"# Wait till the build finishes\ncurl -fsSN $(echo '${{ steps.create_build.outputs.build }}' | jq -cr .output_stream_url) | tee build_log.txt\nbuild_log=$(cat build_log.txt)\nbuild_log=\"${build_log//'%'/'%25'}\"\nbuild_log=\"${build_log//$'\\n'/'%0A'}\"\nbuild_log=\"${build_log//$'\\r'/'%0D'}\"\necho \"text=$build_log\" \u003e\u003e $GITHUB_OUTPUT\n"},{"id":"promote","name":"Promote","if":"steps.pipeline_check.outputs.pipeline_id","shell":"bash","run":"heroku_promotion=$(curl -fsS -X POST 'https://api.heroku.com/pipeline-promotions' \\\n  -d '{\"pipeline\":{\"id\":\"${{ steps.pipeline_check.outputs.pipeline_id }}\"}, \"source\":{\"app\":{\"id\": \"${{ steps.pipeline_check.outputs.source_app_id }}\"}}, \"targets\":[{\"app\":{\"id\": \"${{ steps.pipeline_check.outputs.target_app_id }}\"}}]}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n  -H 'Accept: application/vnd.heroku+json; version=3' \\\n  | jq -rc . \\\n)\necho \"promotion=$heroku_promotion\" \u003e\u003e $GITHUB_OUTPUT\n\npromotion_id=$(echo \"$heroku_promotion\" | jq -rc .id)\necho \"promotion_id=$promotion_id\" \u003e\u003e $GITHUB_OUTPUT\n"},{"id":"get_release","name":"Get Heroku release","shell":"bash","run":"promotion_id='${{ steps.promote.outputs.promotion_id }}'\nif [[ -n \"$promotion_id\" ]]; then\n  sleep 10; # Give Heroku some time to kick off the release\n  release_id=$(curl -fsS \"https://api.heroku.com/pipeline-promotions/$promotion_id/promotion-targets\" \\\n    -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n    -H 'Accept: application/vnd.heroku+json; version=3' \\\n    | jq -rc '.[0].release.id' \\\n  )\nelse\n  release_id=$(curl -fsS 'https://api.heroku.com/apps/${{ inputs.heroku_app_name }}/builds/${{ steps.create_build.outputs.id }}' \\\n    -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n    -H 'Accept: application/vnd.heroku+json; version=3' \\\n    | jq -rc .release.id \\\n  )\nfi\n\necho \"id=$release_id\" \u003e\u003e $GITHUB_OUTPUT\n\nheroku_release=$(curl -fsS \"https://api.heroku.com/apps/${{ inputs.heroku_app_name }}/releases/$release_id\" \\\n  -H 'Authorization: Bearer ${{ inputs.heroku_api_key }}' \\\n  -H 'Accept: application/vnd.heroku+json; version=3' \\\n  | jq -rc . \\\n)\necho \"release=$heroku_release\" \u003e\u003e $GITHUB_OUTPUT\n"},{"id":"release_logs","name":"Heroku release logs","shell":"bash","run":"sleep 10; # Give Heroku some time to kick off the release\n# Wait till the release finishes\ncurl -fsSN $(echo '${{ steps.get_release.outputs.release }}' | jq -rc .output_stream_url) | tee release_log.txt\nrelease_log=$(cat release_log.txt)\nrelease_log=\"${release_log//'%'/'%25'}\"\nrelease_log=\"${release_log//$'\\n'/'%0A'}\"\nrelease_log=\"${release_log//$'\\r'/'%0D'}\"\necho \"text=$release_log\" \u003e\u003e $GITHUB_OUTPUT\n"}]},"branding":{"color":"green","icon":"upload-cloud"},"default_branch":"main","path":null},"repo_metadata":{"id":39744078,"uuid":"485267203","full_name":"formsort/action-heroku-deploy","owner":"formsort","description":"A GitHub action for efficient Heroku Deploys and Releases","archived":false,"fork":false,"pushed_at":"2023-01-04T20:00:45.000Z","size":51,"stargazers_count":13,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-09-15T19:35:59.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/formsort.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":"2022-04-25T07:31:47.000Z","updated_at":"2023-07-28T01:29:32.000Z","dependencies_parsed_at":"2023-01-04T21:31:13.506Z","dependency_job_id":null,"html_url":"https://github.com/formsort/action-heroku-deploy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/formsort/action-heroku-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formsort","download_url":"https://codeload.github.com/formsort/action-heroku-deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy/sbom","scorecard":{"id":407251,"data":{"date":"2025-08-11","repo":{"name":"github.com/formsort/action-heroku-deploy","commit":"6a60efe0aa749c13a07ceb53a765c06c843283ed"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":6,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T21:39:39.488Z","repository_id":39744078,"created_at":"2025-08-18T21:39:39.489Z","updated_at":"2025-08-18T21:39:39.489Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":341189360,"owners_count":37574256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-09-21T02:00:06.232Z","response_time":53,"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"},"owner_record":{"login":"formsort","name":"Formsort","uuid":"45643791","kind":"organization","description":"Build forms that build businesses","email":"hello@formsort.com","website":"https://formsort.com","location":"New York, NY","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/45643791?v=4","repositories_count":8,"last_synced_at":"2023-03-05T00:31:46.389Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/formsort","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-15T03:11:43.815Z","updated_at":"2023-03-05T00:31:46.539Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formsort","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formsort/repositories"},"tags":[{"name":"v1","sha":"64c5a22488c50b1dea4e50c637d168da0efd3ebf","kind":"commit","published_at":"2022-05-14T17:24:13.000Z","download_url":"https://codeload.github.com/formsort/action-heroku-deploy/tar.gz/v1","html_url":"https://github.com/formsort/action-heroku-deploy/releases/tag/v1","dependencies_parsed_at":"2023-05-31T01:37:38.996Z","dependency_job_id":null,"purl":"pkg:github/formsort/action-heroku-deploy@v1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy/tags/v1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formsort%2Faction-heroku-deploy/tags/v1/manifests"}]},"repo_metadata_updated_at":"2026-09-21T23:38:17.049Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":40.26221692491061,"dependent_packages_count":0.0,"stargazers_count":10.258712423516894,"forks_count":9.384187524831148,"docker_downloads_count":null,"average":14.976279218314662},"purl":"pkg:githubactions/formsort/action-heroku-deploy","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/actions/formsort/action-heroku-deploy","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/actions/formsort/action-heroku-deploy","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/actions/formsort/action-heroku-deploy/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/formsort%2Faction-heroku-deploy/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/formsort%2Faction-heroku-deploy/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/formsort%2Faction-heroku-deploy/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/formsort%2Faction-heroku-deploy/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/formsort%2Faction-heroku-deploy/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/formsort%2Faction-heroku-deploy/codemeta","maintainers":[]}