This commit is contained in:
@@ -4,31 +4,12 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "k8s/**"
|
||||
|
||||
jobs:
|
||||
check-changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changes: ${{ steps.filter.outputs.k8s }}
|
||||
helm: ${{ steps.filter.outputs.helm }}
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
k8s:
|
||||
- 'k8s/**'
|
||||
helm:
|
||||
- 'values/**'
|
||||
- 'helmfile.yaml'
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
if: ${{ needs.check-changes.outputs.changes == 'true' || needs.check-changes.outputs.helm == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: https://gitea.t000-n.de/t.behrendt/k_deploy_workflows/.gitea/actions/extract-namespace-from-repo-name@c373c34c836716e663e2d6379e686997bfd7746c # 0.0.6
|
||||
@@ -56,6 +37,16 @@ jobs:
|
||||
"restic_rest_password": "${{ secrets.RESTIC_REST_PASSWORD }}",
|
||||
"gotify_token": "${{ secrets.GOTIFY_TOKEN }}"
|
||||
}
|
||||
- name: Set photoprism admin password
|
||||
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5.0.1
|
||||
with:
|
||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
||||
secret-name: prism-credentials
|
||||
secret-type: generic
|
||||
data: |
|
||||
{
|
||||
"admin_password": "${{ secrets.PHOTOPRISM_ADMIN_PASSWORD }}"
|
||||
}
|
||||
- name: Deploy
|
||||
uses: azure/k8s-deploy@c8cfec839dc09896b3b8cc40cd13d04792680771 # v5.1.0
|
||||
with:
|
||||
@@ -63,7 +54,3 @@ jobs:
|
||||
manifests: "k8s/"
|
||||
strategy: basic
|
||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
||||
- name: Deploy helm
|
||||
uses: helmfile/helmfile-action@d9fefe29b0d07e9ab187ecfe1d63eff91e0a070c # v2.4.1
|
||||
with:
|
||||
helmfile-args: apply
|
||||
|
||||
@@ -28,7 +28,3 @@ jobs:
|
||||
namespace: ${{ steps.namespace.outputs.namespace }}
|
||||
lintType: dryrun
|
||||
manifests: "k8s/"
|
||||
- name: Validate Helm
|
||||
uses: helmfile/helmfile-action@d9fefe29b0d07e9ab187ecfe1d63eff91e0a070c # v2.4.1
|
||||
with:
|
||||
helmfile-args: diff
|
||||
|
||||
Reference in New Issue
Block a user