{"id":22408984,"url":"https://github.com/stevenjdh/branch-details","last_synced_at":"2026-05-05T05:40:16.189Z","repository":{"id":264978144,"uuid":"864924266","full_name":"StevenJDH/branch-details","owner":"StevenJDH","description":"A GitHub action that exposes information about branches, tags, and related concepts to simplify automation activities.","archived":false,"fork":false,"pushed_at":"2024-10-09T22:00:35.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T12:11:47.818Z","etag":null,"topics":["actions","branches","context","details","information","release-automation"],"latest_commit_sha":null,"homepage":"","language":"C#","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/StevenJDH.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":"2024-09-29T14:32:55.000Z","updated_at":"2024-10-09T19:49:32.000Z","dependencies_parsed_at":"2024-11-27T06:35:35.950Z","dependency_job_id":null,"html_url":"https://github.com/StevenJDH/branch-details","commit_stats":null,"previous_names":["stevenjdh/branch-details"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenJDH%2Fbranch-details","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenJDH%2Fbranch-details/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenJDH%2Fbranch-details/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenJDH%2Fbranch-details/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StevenJDH","download_url":"https://codeload.github.com/StevenJDH/branch-details/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245767352,"owners_count":20668828,"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","branches","context","details","information","release-automation"],"created_at":"2024-12-05T12:06:11.129Z","updated_at":"2026-05-05T05:40:16.135Z","avatar_url":"https://github.com/StevenJDH.png","language":"C#","funding_links":["https://www.buymeacoffee.com/stevenjdh","https://www.paypal.me/stevenjdh"],"categories":[],"sub_categories":[],"readme":"# GitHub Action: Branch Details\n\n[![build](https://github.com/StevenJDH/branch-details/actions/workflows/dotnet-action-sonar-container-workflow.yml/badge.svg?branch=main)](https://github.com/StevenJDH/branch-details/actions/workflows/dotnet-action-sonar-container-workflow.yml)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/StevenJDH/branch-details?include_prereleases)\n[![Public workflows that use this action.](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3DStevenJDH%2Fbranch-details%26badge%3Dtrue)](https://github.com/search?o=desc\u0026q=StevenJDH+branch-details+language%3AYAML\u0026s=\u0026type=Code)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f0fe16925f9e4c7599464592c2581b23)](https://app.codacy.com/gh/StevenJDH/branch-details/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Sonar Violations (long format)](https://img.shields.io/sonar/violations/StevenJDH_branch-details?format=long\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/dashboard?id=StevenJDH_branch-details)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=StevenJDH_branch-details\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=StevenJDH_branch-details)\n![Maintenance](https://img.shields.io/badge/yes-4FCA21?label=maintained\u0026style=flat)\n![GitHub](https://img.shields.io/github/license/StevenJDH/branch-details)\n\nBranch Details is a GitHub action that exposes information about branches, tags, and related concepts to simplify automation activities. It has been compiled to native code using [Ahead-Of-Time (AOT)](https://en.wikipedia.org/wiki/Ahead-of-time_compilation) compilation for increased performance and reduced memory usage. The native code is containerized using an Ubuntu-based [.NET Chiseled Container](https://devblogs.microsoft.com/dotnet/announcing-dotnet-chiseled-containers/) to further reduce the image size while significantly improving security and loading speeds. In fact, the base image is made up of only 6 files, which accounts for less than 10MB of the final image size. Do keep in mind that GitHub [only supports container actions on Linux runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#requirements-for-self-hosted-runner-machines), but as soon as this changes, support will be added. \n\n[![Buy me a coffee](https://img.shields.io/static/v1?label=Buy%20me%20a\u0026message=coffee\u0026color=important\u0026style=flat\u0026logo=buy-me-a-coffee\u0026logoColor=white)](https://www.buymeacoffee.com/stevenjdh)\n\n## Features\n\n* Automatic processing of branch details in a predictable way to simplify workflows.\n* Reference outputs for aggregated information associated with a branch.\n* Optionally export outputs to environment variables.\n* Summary reports are generated after each run.\n* When testing locally, GitHub PATs can be auto loaded via [.NET's Secrets Manager](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0\u0026tabs=windows#secret-manager).\n\n## Compatibility\nBelow is a list of GitHub-hosted runners that support jobs using this action.\n\n| Runner     | Supported? | \n|------------|:----------:|\n| [![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=flat\u0026logo=ubuntu\u0026logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) | ✅ |\n| [![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat\\\u0026logo=windows\\\u0026logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) | ❌ |\n| [![macOS](https://img.shields.io/badge/macOS-000000?style=flat\\\u0026logo=macos\\\u0026logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) | ❌ |\n\n## Inputs\nThe following inputs are available:\n\n| Name                                                                         | Type     | Required | Default                         |  Description                                                        |\n|------------------------------------------------------------------------------|----------|:--------:|:-------------------------------:|---------------------------------------------------------------------|\n| \u003ca name=\"drop-tag-prefix\"\u003e\u003c/a\u003e[drop\u0026#x2011;tag\u0026#x2011;prefix](#drop-tag-prefix) | `string` | `false`  | \u003ccode\u003e\u003c/code\u003e                | Removes the prefix of a tag. For example, dropping the `v` in `v1.0.0` using `v`, or the more regex style of `[vV]`, as the input. |\n| \u003ca name=\"export-variables\"\u003e\u003c/a\u003e[export\u0026#x2011;variables](#export-variables)  | `string` | `false`  | `false`                         | Indicates whether or not to set environment variables for each output exposed by this action for other steps in a job. Format is `BD_XXX` with all in uppercase. For example, `triggering_ref` becomes `BD_TRIGGERING_REF`. |\n| \u003ca name=\"github-token\"\u003e\u003c/a\u003e[github\u0026#x2011;token](#github-token)              | `string` | `false`  | \u003ccode\u003e\u0026#xFEFF;$\u0026#xFEFF;{{\u0026#xa0;github.token\u0026#xa0;}}\u003c/code\u003e | Overrides the default GitHub token to authenticate API requests. |\n\n## Outputs\nThe following outputs are available:\n\n| Name                                                                 | Type     | Example(s) | Description                                                                         |\n|----------------------------------------------------------------------|----------|------------|-------------------------------------------------------------------------------------|\n| \u003ca name=\"triggering_ref\"\u003e\u003c/a\u003e[triggering_ref](#triggering_ref)       | `string` | refs\u0026#xFEFF;/\u0026#xFEFF;heads\u0026#xFEFF;/\u0026#xFEFF;main, refs\u0026#xFEFF;/\u0026#xFEFF;pull\u0026#xFEFF;/\u0026#xFEFF;123\u0026#xFEFF;/\u0026#xFEFF;merge, refs\u0026#xFEFF;/\u0026#xFEFF;tags\u0026#xFEFF;/\u0026#xFEFF;v1.0.0 | The fully-formed ref of the branch or tag that triggered the workflow run. |\n| \u003ca name=\"is_tag\"\u003e\u003c/a\u003e[is_tag](#is_tag)                               | `string` | true       | Indicates whether or not `triggering_ref` is a tag.                                 |\n| \u003ca name=\"is_semver\"\u003e\u003c/a\u003e[is_semver](#is_semver)                      | `string` | true       | Indicates whether or not `tag` is using semantic versioning. Always false when `is_tag` is false. |\n| \u003ca name=\"tag\"\u003e\u003c/a\u003e[tag](#tag)                                        | `string` | v1.0.0, 1.0.0  | The tag that triggered the workflow run. Will be empty when `is_tag` is false.  |\n| \u003ca name=\"current_branch_name\"\u003e\u003c/a\u003e[current_branch_name](#current_branch_name) | `string`  | main, feature\u0026#xFEFF;/\u0026#xFEFF;example  | The current working branch regardless of event type. Usually same as `base_branch_name`, but for pull requests, it's same as `head_branch_name`. |\n| \u003ca name=\"is_default_branch\"\u003e\u003c/a\u003e[is_default_branch](#is_default_branch) | `string`  | true  | Indicates whether or not `current_branch_name` is the default branch.                |\n| \u003ca name=\"default_branch_name\"\u003e\u003c/a\u003e[default_branch_name](#default_branch_name) | `string`  | main  | The default branch for the repository.                                         |\n| \u003ca name=\"base_branch_name\"\u003e\u003c/a\u003e[base_branch_name](#base_branch_name) | `string` | main, develop  | The target branch of a commit, pull request, tag, or other event.               |\n| \u003ca name=\"head_branch_name\"\u003e\u003c/a\u003e[head_branch_name](#head_branch_name) | `string` | feature\u0026#xFEFF;/\u0026#xFEFF;example  | The source branch of a pull request, otherwise, it will be empty. |\n| \u003ca name=\"is_pull_request\"\u003e\u003c/a\u003e[is_pull_request](#is_pull_request)    | `string` | true       | Indicates whether or not `triggering_ref` is a pull request.                        |\n| \u003ca name=\"pull_request_id\"\u003e\u003c/a\u003e[pull_request_id](#pull_request_id)    | `string` | 123        | Id of the pull request. Will be empty when `is_pull_request` is false.              |\n| \u003ca name=\"repo_owner_name\"\u003e\u003c/a\u003e[repo_owner_name](#repo_owner_name)    | `string` | stevenjdh  | The username of the user who owns the repository.                                   |\n| \u003ca name=\"repo_name\"\u003e\u003c/a\u003e[repo_name](#repo_name)                      | `string` | my-repo    | The repository name.                                                                |\n| \u003ca name=\"event_actor_name\"\u003e\u003c/a\u003e[event_actor_name](#event_actor_name) | `string` | stevenjdh  | The username of the user or app that initiated the workflow run or rerun.           |\n| \u003ca name=\"is_event_actor_rerun\"\u003e\u003c/a\u003e[is_event_actor_rerun](#is_event_actor_rerun) | `string`  | false  | Indicates whether or not `event_actor` triggered the workflow rerun. May not always be the same actor for reruns, but uses original actor's privileges for it. Will always be false for first runs. |\n| \u003ca name=\"is_event_actor_owner\"\u003e\u003c/a\u003e[is_event_actor_owner](#is_event_actor_owner) | `string`  | true  | Indicates whether or not `event_actor` is the `repo_owner`.                 |\n\n## Usage\nImplementing this action is relatively simple with just a few steps. More practical examples can be found in the [Examples](Examples) folder.\n\n```yaml\nname: 'build'\n\non:\n  push:\n    branches:\n    - main\n  pull_request:\n    branches:\n    - main\n    types: [opened, synchronize, reopened]\n\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Set Branch Outputs\n      id: branch-details\n      uses: stevenjdh/branch-details@v1\n      with:\n        drop-tag-prefix: 'v'\n\n    - name: Display Action Outputs\n      run: |\n        echo \"Action Outputs:\"\n        echo \"- [triggering_ref]: ${{ steps.branch-details.outputs.triggering_ref }}\"\n        echo \"- [is_tag]: ${{ steps.branch-details.outputs.is_tag }}\"\n        echo \"- [is_semver]: ${{ steps.branch-details.outputs.is_semver }}\"\n        echo \"- [tag]: ${{ steps.branch-details.outputs.tag }}\"\n        echo \"- [current_branch_name]: ${{ steps.branch-details.outputs.current_branch_name }}\"\n        echo \"- [is_default_branch]: ${{ steps.branch-details.outputs.is_default_branch }}\"\n        echo \"- [default_branch_name]: ${{ steps.branch-details.outputs.default_branch_name }}\"\n        echo \"- [base_branch_name]: ${{ steps.branch-details.outputs.base_branch_name }}\"\n        echo \"- [head_branch_name]: ${{ steps.branch-details.outputs.head_branch_name }}\"\n        echo \"- [is_pull_request]: ${{ steps.branch-details.outputs.is_pull_request }}\"\n        echo \"- [pull_request_id]: ${{ steps.branch-details.outputs.pull_request_id }}\"\n        echo \"- [repo_owner_name]: ${{ steps.branch-details.outputs.repo_owner_name }}\"\n        echo \"- [repo_name]: ${{ steps.branch-details.outputs.repo_name }}\"\n        echo \"- [event_actor_name]: ${{ steps.branch-details.outputs.event_actor_name }}\"\n        echo \"- [is_event_actor_rerun]: ${{ steps.branch-details.outputs.is_event_actor_rerun }}\"\n        echo \"- [is_event_actor_owner]: ${{ steps.branch-details.outputs.is_event_actor_owner }}\"\n```\n\n## Disclaimer\nBranch Details is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\n## Contributing\nThanks for your interest in contributing! There are many ways to contribute to this project. Get started [here](https://github.com/StevenJDH/.github/blob/main/docs/CONTRIBUTING.md).\n\n## Do you have any questions?\nMany commonly asked questions are answered in the FAQ:\n[https://github.com/StevenJDH/branch-details/wiki/FAQ](https://github.com/StevenJDH/branch-details/wiki/FAQ)\n\n## Want to show your support?\n\n|Method          | Address                                                                                   |\n|---------------:|:------------------------------------------------------------------------------------------|\n|PayPal:         | [https://www.paypal.me/stevenjdh](https://www.paypal.me/stevenjdh \"Steven's Paypal Page\") |\n|Cryptocurrency: | [Supported options](https://github.com/StevenJDH/StevenJDH/wiki/Donate-Cryptocurrency)    |\n\n\n// Steven Jenkins De Haro (\"StevenJDH\" on GitHub)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenjdh%2Fbranch-details","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenjdh%2Fbranch-details","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenjdh%2Fbranch-details/lists"}