{"id":16403956,"url":"https://github.com/benjlevesque/short-sha","last_synced_at":"2025-03-16T16:31:58.309Z","repository":{"id":51746266,"uuid":"246106888","full_name":"benjlevesque/short-sha","owner":"benjlevesque","description":"Github Action to shorten the git SHA1 and make it accessible in outputs","archived":false,"fork":false,"pushed_at":"2024-02-05T09:52:40.000Z","size":426,"stargazers_count":53,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T16:45:01.908Z","etag":null,"topics":["devops"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/benjlevesque.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-09T18:02:57.000Z","updated_at":"2025-01-31T10:53:53.000Z","dependencies_parsed_at":"2024-02-05T11:02:02.443Z","dependency_job_id":"47b2871c-3390-4a4c-b02e-9913cd7ce199","html_url":"https://github.com/benjlevesque/short-sha","commit_stats":{"total_commits":32,"total_committers":6,"mean_commits":5.333333333333333,"dds":0.28125,"last_synced_commit":"07f50eae021d8a73d4185a46e9c41bfe3d7f61d4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjlevesque%2Fshort-sha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjlevesque%2Fshort-sha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjlevesque%2Fshort-sha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjlevesque%2Fshort-sha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjlevesque","download_url":"https://codeload.github.com/benjlevesque/short-sha/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822295,"owners_count":20353500,"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":["devops"],"created_at":"2024-10-11T05:50:51.244Z","updated_at":"2025-03-16T16:31:57.936Z","avatar_url":"https://github.com/benjlevesque.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Short SHA\n\n`short-sha` is a GitHub Action than provides an output `sha` with the shortened commit SHA.\n\n## Usage\n\nYou can access the shortened value with either `${{ steps.short-sha.outputs.sha }}` (`short-sha` being the name of the action step) or `${{ env.SHA }}`.\n\n```yaml\nname: 'build-test'\non: [push]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: benjlevesque/short-sha@v3.0\n        id: short-sha\n        with:\n          length: 6\n      - run: echo $SHA\n        env:\n          SHA: ${{ steps.short-sha.outputs.sha }}\n      - run: echo $SHA\n        env:\n          SHA: ${{ env.SHA }}\n```\n\n## Options\n\n| Name          | Required | Default | Description                              |\n| ------------- | -------- | ------- | ---------------------------------------- |\n| length        | `false`  | 7       | the expected length of the shortened SHA |\n| variable_name | `false`  | `SHA`   | the name of the exported env variable    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjlevesque%2Fshort-sha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjlevesque%2Fshort-sha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjlevesque%2Fshort-sha/lists"}