Feature Suggestion
At the moment three stages are hard coded and can't configured differently. This includes also the triggers when the stage should be updated. It would be a great option if the stages are configurable and more flexible for other projects with more stages or other names and other triggers.
Possible Implementation
Option 1
- Parameter of the Action (only string can be used)
- name: GitOps (build, push and deploy a new Docker image)uses: Staffbase/gitops-github-action@mainwith:
stages: | - name: 'dev' trigger: 'refs/heads/dev' files: ['kubernetes/namespaces/myService/dev/myService-deploy.yaml'] path: 'spec.template.spec.containers.backend.image' - name: stage trigger: 'refs/heads/main' files: ['kubernetes/namespaces/myService/stage/myService-deploy.yaml'] path: 'spec.template.spec.containers.backend.image' - name: prod trigger: 'refs/tags/*' files: ['kubernetes/namespaces/myService/prod/myService-deploy.yaml'] path: 'spec.template.spec.containers.backend.image' # other options
Option 2
- dot file in the repository, e.g
.gitops or .github/gitops-github-action.yml
---
stages:
- name: 'dev'trigger: 'refs/heads/dev'files: ['kubernetes/namespaces/myService/dev/myService-deploy.yaml']path: 'spec.template.spec.containers.backend.image'
- name: stagetrigger: 'refs/heads/main'files: ['kubernetes/namespaces/myService/stage/myService-deploy.yaml']path: 'spec.template.spec.containers.backend.image' - name: prodtrigger: 'refs/tags/*'files: ['kubernetes/namespaces/myService/prod/myService-deploy.yaml']path: 'spec.template.spec.containers.backend.image'
Context
- Configurable Stages for Deployment
Feature Suggestion
At the moment three stages are hard coded and can't configured differently. This includes also the triggers when the stage should be updated. It would be a great option if the stages are configurable and more flexible for other projects with more stages or other names and other triggers.
Possible Implementation
Option 1
Option 2
.gitopsor.github/gitops-github-action.ymlContext