{"id":18044722,"url":"https://github.com/natterstefan/action-authorised-actor","last_synced_at":"2026-05-14T23:35:38.532Z","repository":{"id":65161037,"uuid":"559558170","full_name":"natterstefan/action-authorised-actor","owner":"natterstefan","description":"Execute a GitHub Action only if the (triggering) actor is authorised to do so.","archived":false,"fork":false,"pushed_at":"2023-03-06T04:13:44.000Z","size":2438,"stargazers_count":3,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T16:04:56.401Z","etag":null,"topics":["actions","github-actions","github-workflows","permissions"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/authorised-actor","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/natterstefan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["natterstefan"],"patreon":"natterstefan","custom":["https://www.paypal.me/natterstefan","https://www.buymeacoffee.com/natterstefan"]}},"created_at":"2022-10-30T13:48:20.000Z","updated_at":"2025-02-20T15:53:54.000Z","dependencies_parsed_at":"2024-10-30T18:10:35.502Z","dependency_job_id":"ad67bd1e-ad9d-443d-9950-dcf3e9e449d3","html_url":"https://github.com/natterstefan/action-authorised-actor","commit_stats":{"total_commits":13,"total_committers":3,"mean_commits":4.333333333333333,"dds":0.3076923076923077,"last_synced_commit":"6cc5f0925907997aa03244ddeaca268f0f1c7727"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Faction-authorised-actor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Faction-authorised-actor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Faction-authorised-actor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Faction-authorised-actor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natterstefan","download_url":"https://codeload.github.com/natterstefan/action-authorised-actor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284926,"owners_count":20913689,"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","github-actions","github-workflows","permissions"],"created_at":"2024-10-30T18:10:29.000Z","updated_at":"2026-05-14T23:35:38.503Z","avatar_url":"https://github.com/natterstefan.png","language":"TypeScript","funding_links":["https://github.com/sponsors/natterstefan","https://patreon.com/natterstefan","https://www.paypal.me/natterstefan","https://www.buymeacoffee.com/natterstefan"],"categories":[],"sub_categories":[],"readme":"# action-authorised-actor\n\n[![Test](https://github.com/natterstefan/action-authorised-actor/actions/workflows/test.yml/badge.svg)](https://github.com/natterstefan/action-authorised-actor/actions/workflows/test.yml) [![CodeQL](https://github.com/natterstefan/action-authorised-actor/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/natterstefan/action-authorised-actor/actions/workflows/codeql-analysis.yml)\n\n\u003e Execute a GitHub Action only if the (triggering) actor is authorised to do so.\n\n## Use Case\n\nInstead of adding `if` conditions here and there to determine if the actor is authorised, use this action to simplify the process.\n\n## Usage\n\nAdd the action to your workflow, define `actor` (optional, `env.GITHUB_ACTOR` by default) and `authorisedActors` and decide if the workflow should fail silently (`failSilently`) or not.\n\n### Before\n\n```yml\n- name: Release Tag\n  if: ${{ github.actor == 'username' }}\n  run: npx semantic-release\n```\n\n### After\n\n```yml\n- name: Can actor release?\n  uses: natterstefan/action-authorised-actor@v1\n  with:\n    # JSON: string[]\n    authorisedActors: |\n      [\n        \"octocat\",\n        \"natterstefan\",\n        \"nektos/act\"\n      ]\n    # or utilise GitHub Secrets, to obfuscate who's part of the list\n    # authorisedActors: ${{secrets.authorisedActor}}\n\n# if `failSilently` was set to `false`, this step will not start if the actor is\n# not authorised (included in `authorisedActors`). Instead the workflow will\n# exit with 1 (=failure).\n- name: Release Tag\n  run: npx semantic-release\n```\n\nTake a look at more examples in the\n[`test.yml`](.github/workflows/test.yml#L24) Workflow file.\n\n## Development\n\n\u003e First, you'll need to have a reasonably modern version of `node` handy. This\n\u003e won't work with versions older than 16, for instance.\n\nInstall the dependencies\n\n```bash\nnpm install\n```\n\nBuild the package for distribution\n\n```bash\n# package the source files\nnpm run package\n# afterward create a release with the release GitHub action\n```\n\nRun the tests\n\n```bash\nnpm run package # or npm run dev (watch mode)\nnpm test\n```\n\nTest the workflow locally with \u003chttps://github.com/nektos/act\u003e!\n\n```bash\n# or npm run dev (watch mode)\nnpm run package\n\n# in another terminal window run\nact -j test_failSilenty_True\nact -s authorisedActors=\"[nektos/act]\" -j test_failSilenty_true_with_Secret\n\n# Uncomment test case first, as this one will exit with 1 (=failure)\nact -j testFailSilentyFalse\n```\n\n## Alternatives\n\n- [natterstefan/action-eligible-actor](https://github.com/natterstefan/action-eligible-actor): configure which actor is eligible to run a workflow with ease with a `eligible-actors-rules.json` configuration file\n- [actions-cool/check-user-permission: 👮 A GitHub Action to check user permission of the current repository.](https://github.com/actions-cool/check-user-permission)\n- [im-open/is-actor-authorized: Action that determines if the actor who initiated the workflow is authorized to do so.](https://github.com/im-open/is-actor-authorized)\n\n## LICENSE\n\n[MIT](LICENSE)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://natterstefan.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1043668?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStefan Natter\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-natterstefan\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/natterstefan/action-authorised-actor/commits?author=natterstefan\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/natterstefan/action-authorised-actor/commits?author=natterstefan\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatterstefan%2Faction-authorised-actor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatterstefan%2Faction-authorised-actor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatterstefan%2Faction-authorised-actor/lists"}