Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5669daf771 | |||
| fe234fdf8f |
@@ -28,11 +28,6 @@ on:
|
||||
required: false
|
||||
default: "{}"
|
||||
type: string
|
||||
namespace:
|
||||
description: "Override the default namespace (extracted from repository name)"
|
||||
required: false
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
detect-service-type:
|
||||
@@ -69,7 +64,7 @@ jobs:
|
||||
if: inputs.skip_shared_secrets_deployment != 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@0.0.1
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@244a64884838c35a5fc0dc42e0b82bb70b253dfc # 0.0.1
|
||||
id: namespace
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
@@ -81,7 +76,7 @@ jobs:
|
||||
- name: Set restic backup secret
|
||||
uses: azure/k8s-create-secret@5e49ad902ac755e0815974a44904c728da961747 # v6.0.0
|
||||
with:
|
||||
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
||||
secret-name: backupsidecar-secret
|
||||
secret-type: generic
|
||||
data: |
|
||||
@@ -98,7 +93,7 @@ jobs:
|
||||
if: needs.detect-service-type.outputs.has_k8s == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@0.0.1
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@244a64884838c35a5fc0dc42e0b82bb70b253dfc # 0.0.1
|
||||
id: namespace
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
@@ -124,7 +119,7 @@ jobs:
|
||||
inputs.skip_helm_deployment != 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@0.0.1
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@244a64884838c35a5fc0dc42e0b82bb70b253dfc # 0.0.1
|
||||
id: namespace
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
@@ -135,10 +130,9 @@ jobs:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
- name: Deploy Helm
|
||||
uses: helmfile/helmfile-action@f6f7844b9e6d9f5ac8cf4cdae8ada1a42755c036 # v2.4.4
|
||||
uses: helmfile/helmfile-action@02671705b1dda1dc4b0a4ddd4f9f1ea8f4568c6f # v2.4.3
|
||||
with:
|
||||
helmfile-args: apply
|
||||
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||
env: ${{ fromJSON(inputs.helmfile_env) }}
|
||||
|
||||
# Summary job that always runs to show what was deployed
|
||||
|
||||
@@ -23,11 +23,6 @@ on:
|
||||
required: false
|
||||
default: "{}"
|
||||
type: string
|
||||
namespace:
|
||||
description: "Override the default namespace (extracted from repository name)"
|
||||
required: false
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
detect-service-type:
|
||||
@@ -64,7 +59,7 @@ jobs:
|
||||
if: needs.detect-service-type.outputs.has_k8s == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@0.0.1
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@244a64884838c35a5fc0dc42e0b82bb70b253dfc # 0.0.1
|
||||
id: namespace
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
@@ -76,7 +71,7 @@ jobs:
|
||||
- name: Validate k8s manifests
|
||||
uses: azure/k8s-lint@e4234c50ea835112e72b145bdecd00a94bad42fd # v4.0.0
|
||||
with:
|
||||
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
||||
lintType: dryrun
|
||||
manifests: "${{ inputs.k8s_dir }}"
|
||||
|
||||
@@ -89,7 +84,7 @@ jobs:
|
||||
inputs.skip_helm_validation != 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@0.0.1
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_actions/.gitea/actions/extract-namespace-from-repo-name@244a64884838c35a5fc0dc42e0b82bb70b253dfc # 0.0.1
|
||||
id: namespace
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
@@ -100,10 +95,9 @@ jobs:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
- name: Validate Helm
|
||||
uses: helmfile/helmfile-action@f6f7844b9e6d9f5ac8cf4cdae8ada1a42755c036 # v2.4.4
|
||||
uses: helmfile/helmfile-action@02671705b1dda1dc4b0a4ddd4f9f1ea8f4568c6f # v2.4.3
|
||||
with:
|
||||
helmfile-args: diff
|
||||
namespace: ${{ inputs.namespace || steps.namespace.outputs.namespace }}
|
||||
env: ${{ fromJSON(inputs.helmfile_env) }}
|
||||
|
||||
# Summary job that always runs to show what was validated
|
||||
|
||||
@@ -50,24 +50,22 @@ jobs:
|
||||
|
||||
### CI (`.gitea/workflows/ci.yaml`)
|
||||
|
||||
| Parameter | Description | Default | Required |
|
||||
| ---------------------- | --------------------------------------------------------------- | --------------- | -------- |
|
||||
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
||||
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
||||
| `skip_helm_validation` | Skip Helm validation even if helmfile exists | `false` | No |
|
||||
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
||||
| `namespace` | Override the default namespace (extracted from repository name) | `""` | No |
|
||||
| Parameter | Description | Default | Required |
|
||||
| ---------------------- | -------------------------------------------- | --------------- | -------- |
|
||||
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
||||
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
||||
| `skip_helm_validation` | Skip Helm validation even if helmfile exists | `false` | No |
|
||||
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
||||
|
||||
### CD (`.gitea/workflows/cd.yaml`)
|
||||
|
||||
| Parameter | Description | Default | Required |
|
||||
| -------------------------------- | --------------------------------------------------------------- | --------------- | -------- |
|
||||
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
||||
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
||||
| `skip_helm_deployment` | Skip Helm deployment even if helmfile exists | `false` | No |
|
||||
| `skip_shared_secrets_deployment` | Skip shared secrets deployment | `false` | No |
|
||||
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
||||
| `namespace` | Override the default namespace (extracted from repository name) | `""` | No |
|
||||
| Parameter | Description | Default | Required |
|
||||
| -------------------------------- | -------------------------------------------- | --------------- | -------- |
|
||||
| `k8s_dir` | Path to Kubernetes manifests directory | `k8s/` | No |
|
||||
| `helmfile_path` | Path to helmfile.yaml | `helmfile.yaml` | No |
|
||||
| `skip_helm_deployment` | Skip Helm deployment even if helmfile exists | `false` | No |
|
||||
| `skip_shared_secrets_deployment` | Skip shared secrets deployment | `false` | No |
|
||||
| `helmfile_env` | JSON object string passed as env to helmfile | `{}` | No |
|
||||
|
||||
## Directory Structure Requirements
|
||||
|
||||
|
||||
Reference in New Issue
Block a user