Compare commits
5 Commits
1.0.1
...
e2da15195a
| Author | SHA1 | Date | |
|---|---|---|---|
|
e2da15195a
|
|||
| cc54a9d3c6 | |||
| 2aecdb373d | |||
| e9b699a881 | |||
| 84e1bf7e51 |
@@ -28,6 +28,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: "{}"
|
default: "{}"
|
||||||
type: string
|
type: string
|
||||||
|
namespace:
|
||||||
|
description: "Override the default namespace (extracted from repository name)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect-service-type:
|
detect-service-type:
|
||||||
@@ -74,9 +79,9 @@ jobs:
|
|||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
- name: Set restic backup secret
|
- name: Set restic backup secret
|
||||||
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5.0.1
|
uses: azure/k8s-create-secret@5e49ad902ac755e0815974a44904c728da961747 # v6.0.0
|
||||||
with:
|
with:
|
||||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||||
secret-name: backupsidecar-secret
|
secret-name: backupsidecar-secret
|
||||||
secret-type: generic
|
secret-type: generic
|
||||||
data: |
|
data: |
|
||||||
@@ -130,9 +135,10 @@ jobs:
|
|||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
- name: Deploy Helm
|
- name: Deploy Helm
|
||||||
uses: helmfile/helmfile-action@02671705b1dda1dc4b0a4ddd4f9f1ea8f4568c6f # v2.4.3
|
uses: helmfile/helmfile-action@f6f7844b9e6d9f5ac8cf4cdae8ada1a42755c036 # v2.4.4
|
||||||
with:
|
with:
|
||||||
helmfile-args: apply
|
helmfile-args: apply
|
||||||
|
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||||
env: ${{ fromJSON(inputs.helmfile_env) }}
|
env: ${{ fromJSON(inputs.helmfile_env) }}
|
||||||
|
|
||||||
# Summary job that always runs to show what was deployed
|
# Summary job that always runs to show what was deployed
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
- name: Push tag
|
- name: Push tag
|
||||||
uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@47a1c635cfc76cfb4eeee3db0d0b89bf19007c7a # 0.2.3
|
uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@38c1bbd8bad3e7965744d03de85faa4a5b808d1b # 0.2.4
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.tag.outputs.new-tag }}
|
tag: ${{ steps.tag.outputs.new-tag }}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: "{}"
|
default: "{}"
|
||||||
type: string
|
type: string
|
||||||
|
namespace:
|
||||||
|
description: "Override the default namespace (extracted from repository name)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect-service-type:
|
detect-service-type:
|
||||||
@@ -69,9 +74,9 @@ jobs:
|
|||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
- name: Validate k8s manifests
|
- name: Validate k8s manifests
|
||||||
uses: azure/k8s-lint@6aefe5066f95e73d2b140d8835cc95583b886989 # v3.0.1
|
uses: azure/k8s-lint@e4234c50ea835112e72b145bdecd00a94bad42fd # v4.0.0
|
||||||
with:
|
with:
|
||||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||||
lintType: dryrun
|
lintType: dryrun
|
||||||
manifests: "${{ inputs.k8s_dir }}"
|
manifests: "${{ inputs.k8s_dir }}"
|
||||||
|
|
||||||
@@ -95,9 +100,10 @@ jobs:
|
|||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
- name: Validate Helm
|
- name: Validate Helm
|
||||||
uses: helmfile/helmfile-action@02671705b1dda1dc4b0a4ddd4f9f1ea8f4568c6f # v2.4.3
|
uses: helmfile/helmfile-action@f6f7844b9e6d9f5ac8cf4cdae8ada1a42755c036 # v2.4.4
|
||||||
with:
|
with:
|
||||||
helmfile-args: diff
|
helmfile-args: diff
|
||||||
|
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||||
env: ${{ fromJSON(inputs.helmfile_env) }}
|
env: ${{ fromJSON(inputs.helmfile_env) }}
|
||||||
|
|
||||||
# Summary job that always runs to show what was validated
|
# Summary job that always runs to show what was validated
|
||||||
|
|||||||
@@ -50,22 +50,24 @@ jobs:
|
|||||||
|
|
||||||
### CI (`.gitea/workflows/ci.yaml`)
|
### CI (`.gitea/workflows/ci.yaml`)
|
||||||
|
|
||||||
| Parameter | Description | Default | Required |
|
| Parameter | Description | Default | Required |
|
||||||
| ---------------------- | -------------------------------------------- | --------------- | -------- |
|
| ---------------------- | --------------------------------------------------------------- | --------------- | -------- |
|
||||||
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
||||||
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
||||||
| `skip_helm_validation` | Skip Helm validation even if helmfile exists | `false` | No |
|
| `skip_helm_validation` | Skip Helm validation even if helmfile exists | `false` | No |
|
||||||
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
||||||
|
| `namespace` | Override the default namespace (extracted from repository name) | `""` | No |
|
||||||
|
|
||||||
### CD (`.gitea/workflows/cd.yaml`)
|
### CD (`.gitea/workflows/cd.yaml`)
|
||||||
|
|
||||||
| Parameter | Description | Default | Required |
|
| Parameter | Description | Default | Required |
|
||||||
| -------------------------------- | -------------------------------------------- | --------------- | -------- |
|
| -------------------------------- | --------------------------------------------------------------- | --------------- | -------- |
|
||||||
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
||||||
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
||||||
| `skip_helm_deployment` | Skip Helm deployment even if helmfile exists | `false` | No |
|
| `skip_helm_deployment` | Skip Helm deployment even if helmfile exists | `false` | No |
|
||||||
| `skip_shared_secrets_deployment` | Skip shared secrets deployment | `false` | No |
|
| `skip_shared_secrets_deployment` | Skip shared secrets deployment | `false` | No |
|
||||||
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
||||||
|
| `namespace` | Override the default namespace (extracted from repository name) | `""` | No |
|
||||||
|
|
||||||
## Directory Structure Requirements
|
## Directory Structure Requirements
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user