The SocialGouv GitHub Actions. Actions designed for repos with a .socialgouv
or a .k8s
folder.
Action | usage | target project |
---|---|---|
k8s-manifests | Generate kubernetes manifests | .k8s folder |
k8s-restore-db | - | .k8s folder |
k8s-manifests-debug | Output useful infos from your manifests | * |
k8s-deactivate | Deactivate obsolete environments | * |
autodevops-manifests | Generate kubernetes manifests | * |
autodevops-deploy | Deploy kubernetes manifests | * |
harbor-build-register | Build and register docker images on internal harbor registry | * |
autodevops | Register and Deploy application | .socialgouv folder |
autodevops-build-register | Build and register docker images on ghcr.io | .socialgouv folder |
autodevops-restore-db | - | .socialgouv folder |
mirror-gitlab | Push changes to GitLab | * |
- Display useful informations from your kubernetes manifests in action log
- Post a sticky comment in associated PR
- Outputs :
markdown
,json
,text
variables
- uses: socialgouv/actions/k8s-manifests-debug
with:
path: kubernetes-manifests.yaml
token: ${{ secrets.GITHUB_TOKEN }}
env:
RANCHER_PROJECT_ID: some-project-id # to provide a decent rancher url
see .github/workflows/k8s-manifests-debug-test.yaml
- Deploy app/package to target environment
- uses: SocialGouv/actions/autodevops
with:
project: "my_app"
environment: dev # dev, preprod, prod
imageName: my_product/my_app
token: ${{ secrets.GITHUB_TOKEN }}
kubeconfig: ${{ secrets.SOCIALGOUV_KUBE_CONFIG_DEV }}
- Build docker image and register it to GHCR
- uses: SocialGouv/actions/autodevops-build-register
with:
project: "my_app"
imageName: my_product/my_app
token: ${{ secrets.GITHUB_TOKEN }}
- Generate kubernetes manifests based on custom
.k8s
config
- uses: SocialGouv/actions/autodevops-manifests
with:
environment: "dev"
- Generate kubernetes manifests based on autodevops (
.socialgouv
) config
- uses: SocialGouv/actions/autodevops-manifests
with:
environment: "dev"
- Deploy application over kubernetes
- uses: SocialGouv/actions/autodevops-deploy
id: deploy
with:
environment: "dev"
token: ${{ secrets.GITHUB_TOKEN }}
kubeconfig: ${{ secrets.SOCIALGOUV_KUBE_CONFIG }}
Export main URL as steps.deploy.outputs.url
- Restore database based on autodevops (
.socialgouv
) config
- uses: SocialGouv/actions/autodevops-restore-db
with:
kubeconfig: ${{ secrets.SOCIALGOUV_KUBE_CONFIG_DEV }}
- Restore database based on custom
.k8s
config and ajobs/restore
.
- uses: SocialGouv/actions/k8s-restore-db
with:
kubeconfig: ${{ secrets.SOCIALGOUV_KUBE_CONFIG_DEV }}
- Clean review branches whenever a pull request is closed.
- uses: SocialGouv/actions/k8s-deactivate
with:
kubeconfig: ${{ secrets.SOCIALGOUV_KUBE_CONFIG_DEV }}