{"id":22168922,"url":"https://github.com/cau777/sha-badge-action","last_synced_at":"2025-03-24T17:21:03.201Z","repository":{"id":168663756,"uuid":"644403562","full_name":"cau777/sha-badge-action","owner":"cau777","description":"Simple GitHub Actions workflows that compute the short hash for a given branch and generate a badge with it","archived":false,"fork":false,"pushed_at":"2023-05-23T17:01:21.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T22:16:16.102Z","etag":null,"topics":["actions","badge","utility"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cau777.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-05-23T12:53:14.000Z","updated_at":"2023-05-23T16:59:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"2db68999-b061-47aa-a274-660ee00844d2","html_url":"https://github.com/cau777/sha-badge-action","commit_stats":null,"previous_names":["cau777/sha-badge-action"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2Fsha-badge-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2Fsha-badge-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2Fsha-badge-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2Fsha-badge-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cau777","download_url":"https://codeload.github.com/cau777/sha-badge-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245315307,"owners_count":20595220,"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":["actions","badge","utility"],"created_at":"2024-12-02T06:27:50.093Z","updated_at":"2025-03-24T17:21:03.162Z","avatar_url":"https://github.com/cau777.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# SHA Badge Action\n\nThis repo contains 2 simple GitHub Actions workflows that compute the short hash for a given branch and generate a badge with it.\nThis is useful to quickly check what branch is currently deployed. To make it more realistic, the repo has 3 branches\n(master, canary and production) with some sample data to make the hashes different.\n\n# Option 1: Storing the hashes\n\n![master SHA](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cau777/63a20a64c3d5ea1ef487b04c75629f29/raw/master-sha.json)\n![canary SHA](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cau777/63a20a64c3d5ea1ef487b04c75629f29/raw/canary-sha.json)\n![production SHA](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cau777/63a20a64c3d5ea1ef487b04c75629f29/raw/production-sha.json)\n\nCredit on **schneegans/dynamic-badges-action** for most of the logic.\n\n#### Hosting the hashes\n\nOnce computed, the hashes are hosted in [this public gist](https://gist.github.com/cau777/63a20a64c3d5ea1ef487b04c75629f29).\nThis is necessary because if we tried hosting in the same repo, the badge would not work for private repos (and we\nprobably don't want to distribute access tokens everywhere).\n\n#### Usage\n\nTo include this in your repo:\n1) Generate a personal access token with access to gists under profile/developer settings\n2) Create an action secret in your repo called `GIST_SECRET` with that token\n3) Copy the workflow\n\n# Option 2: Storing SVG\n\n![master SHA](https://github.com/cau777/sha-badge-action/blob/shields-badges/master-sha.svg)\n![canary SHA](https://github.com/cau777/sha-badge-action/blob/shields-badges/canary-sha.svg)\n![production SHA](https://github.com/cau777/sha-badge-action/blob/shields-badges/production-sha.svg)\n\nCredit on **emibcn/badge-action** for most of the logic.\nFor this option, the SVGs are stored in a branch in the same repo. This makes it more\nsuitable for private repos with security concerns.\n\n### Usage\nTo include this in your repo:\n1) Create an empty orphan branch called `shields-badges` \n2) Copy the workflow","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcau777%2Fsha-badge-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcau777%2Fsha-badge-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcau777%2Fsha-badge-action/lists"}