{"id":28610936,"url":"https://github.com/amezin/create-or-update-git-ref-action","last_synced_at":"2026-01-28T18:09:05.884Z","repository":{"id":294760840,"uuid":"987990292","full_name":"amezin/create-or-update-git-ref-action","owner":"amezin","description":"Create or update a Git reference (branch or tag) through GitHub API","archived":false,"fork":false,"pushed_at":"2025-09-09T08:40:18.000Z","size":1593,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T11:07:27.714Z","etag":null,"topics":["action","actions","github-action","github-actions","github-api"],"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/amezin.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-21T22:25:37.000Z","updated_at":"2025-08-11T23:41:43.000Z","dependencies_parsed_at":"2025-07-11T10:23:14.754Z","dependency_job_id":"8452f2a6-5056-47ed-ac8b-37158c9bbd3c","html_url":"https://github.com/amezin/create-or-update-git-ref-action","commit_stats":null,"previous_names":["amezin/create-or-update-git-ref-action"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/amezin/create-or-update-git-ref-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-or-update-git-ref-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-or-update-git-ref-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-or-update-git-ref-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-or-update-git-ref-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amezin","download_url":"https://codeload.github.com/amezin/create-or-update-git-ref-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amezin%2Fcreate-or-update-git-ref-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274340704,"owners_count":25267294,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"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"}},"keywords":["action","actions","github-action","github-actions","github-api"],"created_at":"2025-06-11T23:07:56.928Z","updated_at":"2026-01-28T18:09:05.851Z","avatar_url":"https://github.com/amezin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create or Update Git Reference\n\nCreate or update a Git reference (branch or tag) through GitHub API.\nOr, in other words, set a branch head or a tag to a specific commit.\n\nIf the reference (branch or tag) does not exist, it will be created.\n\nIf it already exists, it will be updated to point to the specified commit.\n\nThis action is intended to be used together with\nhttps://github.com/amezin/create-commit-action to update the branch head after\ncommit, but can also be used standalone for other purposes.\n\n## Usage examples\n\n- Part of a workflow that creates/updates pull requests:\n  https://github.com/amezin/pull-request-generator/blob/main/.github/workflows/make-pull-request.yml\n\n- [Update major version tags of GitHub actions](./.github/workflows/update-major-tag.yml)\n\n## Inputs\n\n### `repository`\n\nThe owner and repository name, in `owner/name` format.\n\n**Default**: `${{ github.repository }}` - the repository where the workflow was triggered.\n\n### `ref`\n\nGit reference name to update or create, **with** `refs/heads/` or `refs/tags/` prefix.\n\n**Default**: `${{ github.ref }}` - the branch that triggered the workflow run.\n\n\u003e [!NOTE]\n\u003e The default value for `pull_request` event is `refs/pull/PULL_REQUEST_NUMBER/merge`.\n\u003e If you want to update pull request's source branch, use `refs/heads/${{ github.head_ref }}`.\n\n### `sha`\n\nTarget commit SHA that the branch or tag should point to.\n\n**Default**: `${{ github.sha }}` - the commit that triggered the workflow.\n\n\u003e [!NOTE]\n\u003e At least one of `ref` and `sha` should be set to a non-default value.\n\u003e Otherwise, you're just updating the \"current\" branch head to the same commit it already points to.\n\n### `force`\n\nWhether to allow non-fast-forward updates.\n\nWhen set to `true`, the behavior is similar to `git push --force`.\n\nWhen set to `false` (default), the behavior is similar to `git push` without `--force`.\n\n**Default**: `false`\n\n### `github-token`\n\nGitHub API token to use.\n\nMust have `contents: write` permission.\n\n**Default**: `${{ github.token }}`\n\n\u003e [!NOTE]\n\u003e If you want GitHub Actions workflows to be triggered from `push` event,\n\u003e you should use a custom token (app installation or personal access token):\n\u003e https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflow\n\n## Outputs\n\nCurrently, none.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famezin%2Fcreate-or-update-git-ref-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famezin%2Fcreate-or-update-git-ref-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famezin%2Fcreate-or-update-git-ref-action/lists"}