{"id":20942564,"url":"https://github.com/wow-actions/app-token","last_synced_at":"2025-05-13T23:33:12.690Z","repository":{"id":63077268,"uuid":"564193883","full_name":"wow-actions/app-token","owner":"wow-actions","description":"A GitHub App to auto generate or update it's installation token saved in the secrets of current repo, then we can use the token to replace `GITHUB_TOKEN` in our workflows.","archived":false,"fork":false,"pushed_at":"2022-12-15T01:44:06.000Z","size":140,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T10:08:47.085Z","etag":null,"topics":["authentication","github-apps","token","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/save-app-token-to-secrets","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/wow-actions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-10T07:34:18.000Z","updated_at":"2023-03-01T10:14:04.000Z","dependencies_parsed_at":"2023-01-29T01:46:02.098Z","dependency_job_id":null,"html_url":"https://github.com/wow-actions/app-token","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wow-actions%2Fapp-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wow-actions%2Fapp-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wow-actions%2Fapp-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wow-actions%2Fapp-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wow-actions","download_url":"https://codeload.github.com/wow-actions/app-token/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043218,"owners_count":22004912,"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":["authentication","github-apps","token","workflow"],"created_at":"2024-11-18T23:28:10.728Z","updated_at":"2025-05-13T23:33:07.673Z","avatar_url":"https://github.com/wow-actions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\u003cimg src=\"logo.svg\" height=\"160\"/\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSave App Token to Secrets\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003e\nA GitHub App to save or update it's installation token into the secrets of current repo, then we can use the token to replace `secrets.GITHUB_TOKEN` in our workflows.\n\u003c/strong\u003e\u003c/p\u003e\n\n## Motivation\n\nThe app's installation token can be used to **impersonate** a GitHub App when `secrets.GITHUB_TOKEN`'s limitations are too restrictive and a personal access token is not suitable. [`secrets.GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) has limitations such as [not being able to triggering a new workflow from another workflow](https://github.community/t5/GitHub-Actions/Triggering-a-new-workflow-from-another-workflow/td-p/31676). A workaround is to use a [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) from a [personal user/bot account](https://help.github.com/en/github/getting-started-with-github/types-of-github-accounts#personal-user-accounts). However, for organizations, GitHub Apps are [a more appropriate automation solution](https://developer.github.com/apps/differences-between-apps/#machine-vs-bot-accounts).\n\n## Usage\n\nVisit the [installation page](https://github.com/marketplace/save-app-token-to-secrets) and install the GitHub App on your repositories. That's all there is to it ❤️\n\nTwo secrets with name `APP_NAME` and `APP_TOKEN` will be created or updated before any workflow run, so we can use the secrets in our workflow.\n\n```yaml\n- name: Semantic Release\n  uses: cycjimmy/semantic-release-action@v2\n  with:\n    extra_plugins: |\n      @semantic-release/changelog\n      @semantic-release/git\n  env:\n    NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n    # use `secrets.APP_TOKEN` to replace `secrets.GITHUB_TOKEN`\n    GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}\n    # use `${{ secrets.APP_NAME }}` as needed\n    GIT_AUTHOR_NAME: ${{ secrets.APP_NAME }}[bot]\n    GIT_AUTHOR_EMAIL: ${{ secrets.APP_NAME }}[bot]@users.noreply.github.com\n    GIT_COMMITTER_NAME: ${{ secrets.APP_NAME }}[bot]\n    GIT_COMMITTER_EMAIL: ${{ secrets.APP_NAME }}[bot]@users.noreply.github.com\n```\n\n## Deploy\n\n**This app only be used for demonstration** which was deployed on [Netlify](https://www.netlify.com). Fork the [source code](https://github.com/wow-actions/app-token) and follow the [tutorial](https://probot.github.io/docs/deployment) to deploy your own app with custom permissions, bot name, avatar, etc.\n\n## License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwow-actions%2Fapp-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwow-actions%2Fapp-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwow-actions%2Fapp-token/lists"}