Skip to content

Commit

Permalink
feat: override kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Jun 26, 2023
1 parent b193804 commit c167d7d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/use-ks-gh-custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
inlineSet:
required: false
type: string
kubeconfig:
required: false
type: string
secrets:
KUBECONFIG:
required: true
Expand All @@ -34,7 +37,7 @@ jobs:

- uses: socialgouv/kontinuous/.github/actions/deploy-via-github@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: ${{ inputs.chart }}
ignoreProjectTemplates: ${{ inputs.ignoreProjectTemplates }}
environment: ${{ inputs.environment }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/use-ks-gh-deactivate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
inlineSet:
required: false
type: string
kubeconfig:
required: false
type: string
secrets:
KUBECONFIG:
required: true
Expand All @@ -31,7 +34,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: deactivate
ignoreProjectTemplates: ${{ inputs.ignoreProjectTemplates }}
inlineValues: ${{ inputs.inlineValues }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/use-ks-gh-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
inlineSet:
required: false
type: string
kubeconfig:
required: false
type: string
secrets:
KUBECONFIG:
required: true
Expand All @@ -34,7 +37,7 @@ jobs:

- uses: socialgouv/kontinuous/.github/actions/deploy-via-github@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: ${{ inputs.chart }}
ignoreProjectTemplates: ${{ inputs.ignoreProjectTemplates }}
environment: ${{ inputs.environment }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/use-ks-gh-preproduction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: preprod
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/use-ks-gh-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: prod
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/use-ks-gh-review-auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: dev
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/use-ks-gh-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: dev
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down

0 comments on commit c167d7d

Please sign in to comment.