{"id":15807937,"url":"https://github.com/kota65535/github-workflow-dispatch-slack-action","last_synced_at":"2025-05-12T20:54:04.175Z","repository":{"id":55753827,"uuid":"523187092","full_name":"kota65535/github-workflow-dispatch-slack-action","owner":"kota65535","description":"GitHub Action for triggering GitHub workflow_dispatch event by Slack.","archived":false,"fork":false,"pushed_at":"2025-05-02T21:54:21.000Z","size":842,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-02T22:32:51.027Z","etag":null,"topics":["github-actions","slack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kota65535.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2022-08-10T03:29:22.000Z","updated_at":"2023-11-16T09:23:25.000Z","dependencies_parsed_at":"2023-02-14T15:55:27.914Z","dependency_job_id":"d0beecec-53a0-4ed9-b88c-2ac9d2fe9c4f","html_url":"https://github.com/kota65535/github-workflow-dispatch-slack-action","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"9318acd7ba51a5558761e29d2edc8a54356d4422"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota65535%2Fgithub-workflow-dispatch-slack-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota65535%2Fgithub-workflow-dispatch-slack-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota65535%2Fgithub-workflow-dispatch-slack-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota65535%2Fgithub-workflow-dispatch-slack-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kota65535","download_url":"https://codeload.github.com/kota65535/github-workflow-dispatch-slack-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253822269,"owners_count":21969830,"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":["github-actions","slack"],"created_at":"2024-10-05T03:01:29.979Z","updated_at":"2025-05-12T20:54:03.999Z","avatar_url":"https://github.com/kota65535.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-workflow-dispatch-slack-action\n\nGitHub Action for triggering\nGitHub [workflow_dispatch](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)\nevent by Slack.\n\nThis action is assumed to be used with a Slack app that handles its interaction payload and trigger the workflow.\nThis can be easily done by Terraform with [github-workflow-dispatch-slack](https://registry.terraform.io/modules/kota65535/github-workflow-dispatch-slack/aws/latest)\nTerraform module.\n\n## Inputs\n\n| Name                | Description                                           | Required | Default                                                 |\n|---------------------|-------------------------------------------------------|----------|---------------------------------------------------------|\n| `repository`        | Owner and repository name                             | No       | `${{ github.repository }}`                              |\n| `workflow`          | Workflow ID or file name                              | Yes      | N/A                                                     |\n| `ref`               | Git reference for the workflow                        | No       | See (*1)                                                |\n| `inputs`            | Input keys and values configured in the workflow file | No       | N/A                                                     |\n| `github-token`      | GitHub token                                          | No       | `${{ env.GITHUB_TOKEN }}` or\u003cbr/\u003e `${{ github.token }}` | \n| `channel`           | Slack channel name                                    | No (*2)  | N/A                                                     | \n| `slack-bot-token`   | Slack bot token                                       | No (*2)  | `${{ env.SLACK_BOT_TOKEN }}`                            | \n| `slack-webhook-url` | Slack webhook URL                                     | No (*2)  | `${{ env.SLACK_WEBHOOK_URL }}`                          | \n| `mention`           | Slack user ID to mention                              | No       | N/A                                                     | \n\n1. `ref` default value are determined by the `repository` input and the event type as follows:\n\n| `repository` value             | Event type         | `ref` default value                         |\n|--------------------------------|--------------------|---------------------------------------------|\n| `${{ github.repository }}`     | `pull_request`     | `${{ github.event.pull_request.head.ref }}` |\n| `${{ github.repository }}`     | Not `pull_request` | `${{ github.ref }}`                         |\n| Not `${{ github.repository }}` | *                  | Default branch of the repository            |\n\n2. Need to specify `channel` and `slack-bot-token` both or `slack-webhook-url`.\n\n## Usage\n\n1. Create a Slack app in your workspace. Then get its bot token or webhook URL.\n2. Create related AWS resources by Terraform with [github-workflow-dispatch-slack](https://registry.terraform.io/modules/kota65535/github-workflow-dispatch-slack/aws/latest)\n   Terraform module.\n3. Enable interactivity of the Slack app. Use the API Gateway's invoke URL into as the Request URL.\n4. Use this actions like this.\n\n```yaml\n\n  my-job:\n    runs-on: ubuntu-latest\n    needs:\n      - plan\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Trigger the workflow by Slack bot\n        uses: kota65535/github-workflow-dispatch-slack-action@v1\n        with:\n          workflow: do-something.yml\n          inputs: '{\"foo\":\"1\",\"bar\":\"2\"}'\n          channel: my-ci\n          slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkota65535%2Fgithub-workflow-dispatch-slack-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkota65535%2Fgithub-workflow-dispatch-slack-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkota65535%2Fgithub-workflow-dispatch-slack-action/lists"}