{"id":22878821,"url":"https://github.com/taskworld/strapi-plugin-github-action-dispatch","last_synced_at":"2025-03-31T14:31:44.931Z","repository":{"id":205772904,"uuid":"715033680","full_name":"taskworld/strapi-plugin-github-action-dispatch","owner":"taskworld","description":"A strapi plugin to trigger a github workflow from the strapi admin panel","archived":false,"fork":false,"pushed_at":"2023-11-07T12:11:59.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T13:40:12.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taskworld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2023-11-06T10:52:01.000Z","updated_at":"2023-11-06T10:53:27.000Z","dependencies_parsed_at":"2024-12-13T16:42:45.216Z","dependency_job_id":"502e530c-5c16-4d91-9171-53f03a0a3e8e","html_url":"https://github.com/taskworld/strapi-plugin-github-action-dispatch","commit_stats":null,"previous_names":["taskworld/strapi-plugin-github-action-dispatch"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskworld%2Fstrapi-plugin-github-action-dispatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskworld%2Fstrapi-plugin-github-action-dispatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskworld%2Fstrapi-plugin-github-action-dispatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskworld%2Fstrapi-plugin-github-action-dispatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskworld","download_url":"https://codeload.github.com/taskworld/strapi-plugin-github-action-dispatch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246482838,"owners_count":20784788,"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":[],"created_at":"2024-12-13T16:32:33.589Z","updated_at":"2025-03-31T14:31:44.914Z","avatar_url":"https://github.com/taskworld.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# strapi-plugin-github-action-dispatch\n\nThis plugin provides a web ui to trigger a Github workflow run from strapi's admin panel as well as a list of the latest run status and results.\n\n## Installation\n\n- Install the plugin with `yarn add strapi-plugin-github-action-dispatch`\n\n## Configuration\n\nThe plugin will run without options by default.\n\n**When doing so, the generated tarball name will be your package.json name field, and encryption will be disabled.**\n\nIn your `config/plugins.js` you can add:\n\n```js\n{\n  \"strapi-plugin-github-action-dispatch\": {\n    enabled: true,\n    config: {\n      token: env(\"GITHUB_TOKEN\"),\n      repository: 'my-username-or-org/my-repo-name',\n      workflow: \"my-workflow.yml\",\n      ref: \"main\" // optional, defaults to main\n    }\n  }\n}\n```\n\n- The `token` should be a GitHub PAT with permissions to list workflows and run them (Actions: RW)\n- the `repository` is your typical `${owner}/${repo}` in one string\n- the `workflow` is either the file name or the workflow id (as per Github API spec)\n\n## ACL\n\nYou can go an enable/disable this plugin's actions in the roles section of the admin panel. This should enable/disable endpoints and stop displaying the section according to the permissions you provided.\n\n## GitHub Workflow\n\nA boilerplate file for your workflow should be this one:\n\n```yml\nname: 🚀\nrun-name: 🚀 (by ${{ inputs.email }})\n\non:\n  workflow_dispatch:\n    inputs:\n      email:\n        default: 'unknown@example.com' # used to mark ownership of the run from strapi\n\njobs:\n  build-and-deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n      - run: echo \"hello world\"\n```\n\nAs you can see in the screenshot at the top of this README, there's an `Initiator` column which logs which user triggered the workflow run. In order to avoid creating a GitHub account for every Strapi user and ask them to create a PAT, there's an `inputs.email` field provided in the workflow run to store the user's identity.\n\nSadly, due to a limitation in GitHub's APi, we cannot fetch a run's inputs so we have no choice but to leverage `run-name` to insert the `inputs.email` and later parse it in the APi response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskworld%2Fstrapi-plugin-github-action-dispatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskworld%2Fstrapi-plugin-github-action-dispatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskworld%2Fstrapi-plugin-github-action-dispatch/lists"}