feat: add restic backup secret
This commit is contained in:
@@ -18,6 +18,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
skip_shared_secrets_deployment:
|
||||||
|
description: "Skip shared secrets deployment (e.g. restic backup secret)"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect-service-type:
|
detect-service-type:
|
||||||
@@ -48,6 +53,26 @@ jobs:
|
|||||||
echo "No k8s directory found at ${{ inputs.k8s_dir }}"
|
echo "No k8s directory found at ${{ inputs.k8s_dir }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
deploy-shared-secrets:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: detect-service-type
|
||||||
|
if: inputs.skip_shared_secrets_deployment != 'true'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Set restic backup secret
|
||||||
|
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5.0.1
|
||||||
|
with:
|
||||||
|
namespace: ${{ steps.namespace.outputs.namespace }}
|
||||||
|
secret-name: backupsidecar-secret
|
||||||
|
secret-type: generic
|
||||||
|
data: |
|
||||||
|
{
|
||||||
|
"restic_password": "${{ secrets.RESTIC_PASSWORD }}",
|
||||||
|
"restic_rest_username": "${{ secrets.RESTIC_REST_USERNAME }}",
|
||||||
|
"restic_rest_password": "${{ secrets.RESTIC_REST_PASSWORD }}",
|
||||||
|
"gotify_token": "${{ secrets.GOTIFY_TOKEN }}"
|
||||||
|
}
|
||||||
|
|
||||||
deploy-k8s:
|
deploy-k8s:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: detect-service-type
|
needs: detect-service-type
|
||||||
|
|||||||
Reference in New Issue
Block a user