{"id":17990997,"url":"https://github.com/oleksiyrudenko/gha-git-credentials","last_synced_at":"2025-03-25T23:31:53.812Z","repository":{"id":54582383,"uuid":"245117232","full_name":"OleksiyRudenko/gha-git-credentials","owner":"OleksiyRudenko","description":"GitHub Action for setting up git credentials","archived":false,"fork":false,"pushed_at":"2024-04-10T02:39:01.000Z","size":40,"stargazers_count":43,"open_issues_count":6,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T22:35:59.431Z","etag":null,"topics":["actions","credentials","credentials-helper","github","github-action","github-actions","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/configure-git-credentials","language":"Shell","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/OleksiyRudenko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-05T09:14:38.000Z","updated_at":"2025-03-19T13:18:09.000Z","dependencies_parsed_at":"2024-06-18T20:02:23.786Z","dependency_job_id":null,"html_url":"https://github.com/OleksiyRudenko/gha-git-credentials","commit_stats":{"total_commits":28,"total_committers":4,"mean_commits":7.0,"dds":0.5,"last_synced_commit":"36b67ed961483586686b268f5fb50314e64c7579"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2Fgha-git-credentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2Fgha-git-credentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2Fgha-git-credentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OleksiyRudenko%2Fgha-git-credentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OleksiyRudenko","download_url":"https://codeload.github.com/OleksiyRudenko/gha-git-credentials/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245223507,"owners_count":20580356,"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","credentials","credentials-helper","github","github-action","github-actions","workflow"],"created_at":"2024-10-29T19:19:51.163Z","updated_at":"2025-03-25T23:31:48.783Z","avatar_url":"https://github.com/OleksiyRudenko.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Credentials for GitHub workflows\n\n[GitHub Action](https://github.com/features/actions) for setting up\ngit credentials.\n\nThis action can be useful when workflow provides for creating commits\n(e.g. when publishing content) and/or pushing commits to remote repos.\n[Action on the marketplace](https://github.com/marketplace/actions/configure-git-credentials).\n\nDefault values would work for the most cases.\nHowever **token** parameter must be passed to the action explicitly.\n\nGitHub requires the use of\na [Personal Access Token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line)\nassigned to the calling workflow\n[secrets](https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables)\nfor pushing to repositories other than the repo the workflow is triggered for.\n\nPushing to the current repository should work\nwith the always-available GitHub Token `{{ secrets.GITHUB_TOKEN }}`.\n\nYou may also want to override default git username and email.\n\nActor would also be overridden when pushing to a repo cloud other than GitHub.\n\nThis project deployment workflow uses very this action to build its own distribution package.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n## Table of Contents\n\n- [Inputs](#inputs)\n- [Outputs](#outputs)\n- [Usage Example](#usage-example)\n- [Versions](#versions)\n  - [What version to use?](#what-version-to-use)\n  - [v2.1.1](#v211)\n  - [v2.1.0](#v210)\n  - [v2](#v2)\n  - [v1](#v1)\n- [Action Users](#action-users)\n- [License](#license)\n- [No affiliation with GitHub Inc.](#no-affiliation-with-github-inc)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- generated with [DocToc](https://github.com/thlorenz/doctoc) --\u003e\n\n## Inputs\n\n| property name | value type | default value                              | description                                                                  |\n|---------------|------------|--------------------------------------------|------------------------------------------------------------------------------|\n| `global`      | boolean    | `false`                                    | global git config used to assign git user name, email and password when true |\n| `name`        | string     | `\"GitHub Action\"`                          | value for `git config user.name`                                             |\n| `email`       | string     | `\"github-action@users.noreply.github.com\"` | value for `git config user.email`                                            |\n| `actor`       | string     | `github.actor`                             | value used to construct `GIT_USER`                                           |\n| `token`       | string     | **n/a**, explicit value required           | **required** value for `git user.password` and `GIT_USER`                    |\n\nThe minimally required action configuration requires a token being explicitly specified.\nExample below uses secrets.GITHUB_TOKEN available to the workflow as a token source.\n\n```\n- uses: oleksiyrudenko/gha-git-credentials@v2-latest\n  with:\n    token: '${{ secrets.GITHUB_TOKEN }}'\n```\n\n## Outputs\n\nNo outputs produced.\n\n## Usage Example\n\n```yaml\nname: Deployment\non:\n  push:\n    branches:\n      - master\njobs:\n  publish:\n    - uses: actions/checkout@v2\n    # Publish to a branch in current repo using GITHUB_TOKEN and other default settings.\n    - uses: oleksiyrudenko/gha-git-credentials@v2-latest\n      with:\n        token: '${{ secrets.GITHUB_TOKEN }}'\n    - run: |\n        yarn run build\n        yarn run deploy\n    # Publish to a branch in a different repo\n    # using a PAT generated on that other repo.\n    # Option `global` is set to true as the deployment script may create \n    # a temporary local repo for a build and we want it to reuse git user settings.\n    # Option `actor` is assigned as per that different repo cloud user.\n    - uses: oleksiyrudenko/gha-git-credentials@v2.1.1\n      with:\n        global: true\n        name: 'Oleksiy Rudenko'\n        email: 'oleksiy.rudenko@domain.com'\n        actor: 'OleksiyRudenko'\n        token: '${{ secrets.GL_PAT_WEB_CENTRAL }}'\n    - run: |\n        git remote add web-central https://gitlab.com/some-organization/website.git\n        yarn run deploy web-central/master\n```\n\nYou may want to set the `global` option true when committing\nto multiple local repositories during the workflow run is anticipated.\n\n\u003e Note that the second use of `gha-git-credentials` refers to a specific\n\u003e version of the action (`@v2.1.1`). In fact `@v2-latest` would work here quite fine\n\u003e and is a better approach.\n\nCheck [What version to use?](#what-version-to-use) to choose proper\naction version reference.\n\n## Versions\n\n### What version to use?\n\nIn workflow `.yml` file you are required to specify action version.\nE.g. `uses: oleksiyrudenko/gha-git-credentials@v2`.\n`@v2` here refers to a very specific version of the action script.\n\nSo, in this action the options are:\n- `vX`, `vX.Y`, `vX.Y.Z` - specific version\n- `vX-latest` - latest release within the major version\n  (no breaking changes, backward compatibility)\n- `latest` - latest release, major version change may occur\n- `\u003cbranch-name\u003e` - version as per given branch name, useful for testing\n- `rc` - release candidate. Used for pre-prod testing within\n  the [release process](./CONTRIBUTING.md#release-process).\n\nWhenever non-breaking changes introduced, having backward compatibility secured,\na patch version is released and the relevant `vX-latest` tag is moved to point\nat the latest release within current major version.\n\nUsing `vX-latest` is a recommended choice.\n\nBelow are the key features of the releases.\nCheck [CHANGELOG](./CHANGELOG.md) for details.\n\n\u003cdetails\u003e\u003csummary\u003eNotes on version tagging\u003c/summary\u003e\n\n**Q: What I would do differently?**\n\nA: I would tag every single release with a full\nsemantic version notation\n(i.e. `vX.Y.Z`, e.g. `v2.0.0`, `v2.0.1`, `v2.1.0`, `v2.1.3`, `v2.2.5` etc).\n\nThen, taking the above examples into consideration,\nextra tags would work as follows:\n- `v2` points at the same commit `v2.2.5` does \n  (the latest release within `v2` scope). \n  Currently `v2` points at `v2.0.0` serving as a shorthand\n  for the full semantic notation.\n- `v2.1` points at the same commit `v2.1.3` does\n  (the latest release within `v2.1` scope).\n  Currently `v2.1` points exactly at `v2.1.0` serving as a shorthand\n  for the full semantic notation.\n\n**Q: Why not change the approach now?**\n\nA: Current [action users](#action-users) may rely \non current tagging approach. Changing version handling\nand tagging approach may break their workflows\n\u003c/details\u003e\n\n### v2.1.1\n\nConfigure action to use NodeJS v16 instead of v12.\n[Reason](https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/).\n\n### v2.1.0\n\nIntroduce `global` option to configure global git user name, email and password.\nDefault is `false` for backward compatibility.\n\n### v2\nChanged the way `GIT_USER` env var is being assigned.\n\nReason:\n[GitHub deprecated `add-path` and `set-env` commands](https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/).\n\n### v1\nFeatures:\n- Configurable git user name, email and password for commits created in a course of the workflow\n- Configurable actor and token (GIT_USER) to push updates from a workflow\n\n## Action Users\n\nAs of November 06, 2022, [762 projects on GitHub depend on this GitHub action](https://github.com/OleksiyRudenko/gha-git-credentials/network/dependents).\n\n**10 top rated**\n\n| url                                                     | stars   |\n|---------------------------------------------------------|---------|\n| https://github.com/yewstack/yew                         | 25K     |\n| https://github.com/lingui/js-lingui                     | 3.5K    |\n| https://github.com/wickedest/Mergely                    | 1.0K    |\n| https://github.com/CuyZ/Valinor                         | 725     |\n| https://github.com/snowplow/snowplow-javascript-tracker | 495     |\n| https://github.com/themoonisacheese/2bored2wait         | 368     |\n| https://github.com/Lightning-AI/tutorials               | 171     |\n| https://github.com/diegoazh/gmap-vue                    | 140     |\n| https://github.com/Umkus/ip-index                       | 134     |\n| https://github.com/cookiejar/cookietemple               | 128     |\n\n_Stats built with [ghtopdep](https://github.com/github-tooling/ghtopdep)_\n\n## License\n\nScripts and documentation in this project are released under the [MIT license](LICENSE).\n\n## No affiliation with GitHub Inc.\n\nGitHub are registered trademarks of GitHub, Inc.\nGitHub name used in this project are for identification purposes only.\nThe project is not associated in any way with GitHub Inc.\nand is not an official solution of GitHub Inc.\nIt was made available in order to facilitate the use of the site GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleksiyrudenko%2Fgha-git-credentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleksiyrudenko%2Fgha-git-credentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleksiyrudenko%2Fgha-git-credentials/lists"}