staffbase / gitops-github-action Goto Github PK
View Code? Open in Web Editor NEWGitHub Action for our GitOps workflow
GitHub Action for our GitOps workflow
yq
from the repository and get it in the run of the action from the original repositorysudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.8.0/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
When you disable the docker build/push using dockerenabled: false
, you have to provide the action with registry-credentials anyway. This doesn't make sense and in case docker is disabled for the run, the credentials should not be required.
https://stackoverflow.com/questions/8123674/how-to-git-commit-nothing-without-an-error
retagging_enabled
An example: Currently we have an extra step in the backend for example.
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.
- name: GitOps (build, push and deploy a new Docker image)
uses: Staffbase/gitops-github-action@main
with:
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
.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: 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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.