Github-actions-controller is designed as a central place for github workflows to be managed from. This ranges from linting, testing, building and deploying workflows for code.
Think of it like a easy quick way to get setup with basic workflows, and if you wanted to update them across multiple repositories, this is the place to do so! It is intended to be the central place to manage them, rather than going into each repository and updating them one at a time.
To get started in your repository setup a workflow file, similar to the below example.
name: Github Actions Controller
on: workflow_dispatch
permissions:
contents: write
pull-requests: write
issues: write
repository-projects: write
actions: write
jobs:
Update-deployment-workflow:
runs-on: ubuntu-latest
steps:
- name: Pull workflows
uses: BenFielder/github-actions-controller@<Your chosen version here>
with:
testing_workflows: true
linting_workflows: true
build_workflows: true
deployment_workflows: true
github_token: ${{ secrets.GITHUB_TOKEN }}
Then in your repository you would manually trigger the workflow via the workflow dispatch for it to then create a pull request in your repo with the workflow files you want.
As can be seen in the example above, the workflow needs the following write permissions:
- contents
- pull-requests
- issues
- repository-projects
- actions
The workflow has four different arguments that can be set, as seen in the above example, you can set the following:
- testing_workflows → This will pull in workflows to test your code, think Jest or Pytest
- linting_workflows → This will pull in workflows to lint your code, such as Pylint other linting tools!
- build_workflows → This will pull in workflows to build your code, npm etc
- deployment_workflows → Finally this will get deployment workflows for you to deploy your code somewhere.
Setting one of these to true will mean the chosen workflow category files will be included in future workflow run pull requests
Setting one of these to false will mean the chosen workflow category files will not be included in any future workflow run pull requests.
By default all workflow categories are set to false
You need to provide your github token/an automated github token in order for it to create pull requests in the repository it is being ran in.