https://github.com/stephenmp/workflow-toggle
GitHub Action to Enable/Disable GitHub Actions Workflows
https://github.com/stephenmp/workflow-toggle
Last synced: 2 months ago
JSON representation
GitHub Action to Enable/Disable GitHub Actions Workflows
- Host: GitHub
- URL: https://github.com/stephenmp/workflow-toggle
- Owner: StephenMP
- License: mit
- Created: 2022-03-16T17:20:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-15T17:40:19.000Z (about 3 years ago)
- Last Synced: 2024-03-15T05:03:07.953Z (over 2 years ago)
- Language: TypeScript
- Size: 995 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Toggle Workflow
This action allows you to enable/disable a GitHub Actions Workflow.
| Build | Tests |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [](https://github.com/StephenMP/workflow-toggle/actions/workflows/test.yaml) | [](https://coveralls.io/github/StephenMP/workflow-toggle) |
## Documentation
### Usage
```yaml
- name: Toggle Workflow
uses: StephenMP/workflow-toggle@v2
with:
token: ${{ secrets.YOUR_GITHUB_TOKEN }}
workflow_id: YourWorkflow.yaml
action: enable # Or disable
owner: YourOrgOrUser
repo: YourRepo
```
### Inputs
| Input | Required | Default | Description |
| ----------- | -------- | ---------------------------------------------- | ------------------------------------------------------------------------------ |
| token | yes | | A GitHub access token with the "workflow" scope |
| workflow_id | yes | | The workflow file name or the workflow ID |
| action | yes | | Either "enable" or "disable" to enable/disable the workflow |
| owner | no | The owner of the repository calling the action | The repo owner (defaults to owner of the running action) |
| repo | no | The repository calling the action | The repo with the workflow to disable (defaults to repo of the running action) |