{"id":18026387,"url":"https://github.com/philips-software/app-token-action","last_synced_at":"2025-03-27T01:31:11.313Z","repository":{"id":38425997,"uuid":"346003946","full_name":"philips-software/app-token-action","owner":"philips-software","description":"GitHub action to obatin app token","archived":false,"fork":false,"pushed_at":"2024-08-31T21:01:59.000Z","size":2276,"stargazers_count":6,"open_issues_count":20,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T13:57:27.567Z","etag":null,"topics":["action","actions","github-action","github-actions"],"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/philips-software.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-09T12:48:49.000Z","updated_at":"2024-07-30T13:25:38.000Z","dependencies_parsed_at":"2024-02-01T10:25:40.245Z","dependency_job_id":"47bda734-0cfe-4336-adc6-35d286d08654","html_url":"https://github.com/philips-software/app-token-action","commit_stats":{"total_commits":78,"total_committers":7,"mean_commits":"11.142857142857142","dds":0.3589743589743589,"last_synced_commit":"a8340324025d2d8204dc581c1d04e969c0eaa541"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fapp-token-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fapp-token-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fapp-token-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fapp-token-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philips-software","download_url":"https://codeload.github.com/philips-software/app-token-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764645,"owners_count":20668455,"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":["action","actions","github-action","github-actions"],"created_at":"2024-10-30T08:06:32.307Z","updated_at":"2025-03-27T01:31:09.923Z","avatar_url":"https://github.com/philips-software.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# App token action\n\n\u003e [!IMPORTANT]\n\u003e This action is deprecated. Please migrate to the [github-app-token-action](https://github.com/actions/create-github-app-token). \n\u003e\n\u003e Migration is almost straight forward, be-aware that GitHub actions requires the key as input and not the base64 encoded version of the private key. See [here](https://github.com/actions/create-github-app-token?tab=readme-ov-file#private-key) how to do that securely.\n\n\nA GitHub action that obtains a token for an app authorization which can used instead of a personal access token (PAT) for example. Currently the *app* and *installation* scope are supported. For more details check out the GitHub App authentication [docs](https://docs.github.com/en/free-pro-team@latest/developers/apps/authenticating-with-github-apps)\n\nBefore the action can be used the APP has to be installed on the subject repository or in the organization scope.\n\n\n\u003c!-- action-docs-description --\u003e\n## Description\n\nAction will set application or application installation token as output.\n\u003c!-- action-docs-description --\u003e\n\n\u003c!-- action-docs-inputs --\u003e\n## Inputs\n\n| parameter | description | required | default |\n| --- | --- | --- | --- |\n| app_id | Application ID | `true` |  |\n| app_base64_private_key | Application SSH private key as base64 | `true` |  |\n| auth_type | Authorization type, either app or installation | `false` | app |\n| org | Name of the org, if not provided will be read from the event. | `false` |  |\n\u003c!-- action-docs-inputs --\u003e\n\n\u003c!-- action-docs-outputs --\u003e\n## Outputs\n\n| parameter | description |\n| --- | --- |\n| token | Application token |\n\u003c!-- action-docs-outputs --\u003e\n\n\u003c!-- action-docs-runs --\u003e\n## Runs\n\nThis action is a `node20` action.\n\u003c!-- action-docs-runs --\u003e\n\n## Usage\n\nBelow an example snippet how to use the action.\n\n```yml\njob:\n  name: Get App token\n  id: get_token\n  runs-on: self-hosted\n  steps:\n    - uses: philips-software/app-token-action@\u003cversion\u003e\n      with:\n        app_id: ${{ secrets.APP_ID }}\n        app_base64_private_key: ${{ secrets.APP_BASE64_PRIVATE_KEY }}\n        auth_type: installation\n    - uses: a-next-action\n      with:\n        token: ${{ steps.get_token.outputs.token }}\n\n```\n\n## Development\n\nStandard commands such as lint, test and build are available via yarn. Check [package.json] for more details.\n\n### Test locally\n\nRunning locally requires you hav have an app in your org that is installed on one or more repositories. To run the local ensure you have set the environment variables:\n\n- `INPUT_AUTH_TYPE` : `app` or `token`\n- `INPUT_APP_ID` and `INPUT_APP_BASE64_PRIVATE_KEY`: The app id and app ssh key. \n- `INPUT_ORG`: The org in which the app is installed.\n\n\n**Example:**\n\n```bash\nexport INPUT_ORG=philips-software\nexport INPUT_APP_ID=1234\nexport INPUT_AUTH_TYPE=installation\nexport INPUT_APP_BASE64_PRIVATE_KEY=$(cat my.pem | base64)\nyarn watch\n```\n\n## Contribution\n\nWe welcome contributions, please checkout the [contribution guide](CONTRIBUTING.md). \n\n\n## License\n\nThis project are released under the [MIT License](./LICENSE).\n\n## Philips Forest\n\nThis module is part of the Philips Forest.\n\n```\n                                                     ___                   _\n                                                    / __\\__  _ __ ___  ___| |_\n                                                   / _\\/ _ \\| '__/ _ \\/ __| __|\n                                                  / / | (_) | | |  __/\\__ \\ |_\n                                                  \\/   \\___/|_|  \\___||___/\\__|\n\n                                                                            CI\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fapp-token-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilips-software%2Fapp-token-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fapp-token-action/lists"}