Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Git Context Action

Smart resolution of git details. Validates inputs, resolves SHA from ref, and outputs comprehensive metadata.

Inputs

InputDescriptionRequired
repositoryRepository in format owner/repoYes
tokenGitHub token with repo accessYes
branchBranch name. If provided, verified against SHA/Ref.No
shaCommit SHA. If provided, used as verification target.No
refGit ref (e.g., refs/heads/main). If provided, verified.No
ref_nameReference name overrideNo

Outputs

OutputDescription
shaFull commit SHA (40 characters)
sha_shortShort commit SHA (7 characters)
refFull git reference
ref_nameReference name without prefix
branchBranch name (if resolved)
tagsComma-separated list of tags
tagFirst tag pointing to this commit
commit_messageCommit message (first line)
commit_message_fullFull commit message
author_nameAuthor Name
author_emailAuthor Email
author_dateAuthor Date
committer_nameCommitter Name
committer_emailCommitter Email
committer_dateCommitter Date

Usage

Default (Auto-detect Default Branch)

Resolves the repository's default branch (e.g., main or master).

- uses: Appegy/git-context-action@v1id: git-contextwith:
repository: ${{ github.repository }}token: ${{ secrets.GITHUB_TOKEN }}

Specific Branch

Resolves a specific branch. Fails if the branch does not exist.

- uses: Appegy/git-context-action@v1with:
repository: ${{ github.repository }}token: ${{ secrets.GITHUB_TOKEN }}branch: 'feature/my-branch'

Specific SHA

Resolves details for a specific commit SHA.

- uses: Appegy/git-context-action@v1with:
repository: ${{ github.repository }}token: ${{ secrets.GITHUB_TOKEN }}sha: 'a1b2c3d4e5f6...'

Specific Tag (Ref)

Resolves a specific git reference (tag or branch).

- uses: Appegy/git-context-action@v1with:
repository: ${{ github.repository }}token: ${{ secrets.GITHUB_TOKEN }}ref: 'refs/tags/v1.0.0'

Override Reference Name

Manually override the ref_name output, useful for custom workflows.

- uses: Appegy/git-context-action@v1with:
repository: ${{ github.repository }}token: ${{ secrets.GITHUB_TOKEN }}ref_name: 'custom-release-name'

About

Resolves complete git reference information from a repository.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages