48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'traefik/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy-traefik:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d # v5.1.0
|
|
- uses: azure/k8s-set-context@8698eba2499e9012f0d5085f8798077cce4bc526 # v5.0.1
|
|
with:
|
|
method: kubeconfig
|
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
|
- name: Set ionos api credentials
|
|
uses: azure/k8s-create-secret@ba774cded95cc0d795806a986fecd1205a6c2320 # v6.0.1
|
|
with:
|
|
namespace: kube-system
|
|
secret-name: ionos-api-credentials
|
|
secret-type: generic
|
|
data: |
|
|
{
|
|
"apiKey": "${{ secrets.IONOS_API_KEY }}"
|
|
}
|
|
- name: Set admin basic auth credentials
|
|
uses: azure/k8s-create-secret@ba774cded95cc0d795806a986fecd1205a6c2320 # v6.0.1
|
|
with:
|
|
namespace: kube-system
|
|
secret-name: admin-basic-auth-credentials
|
|
secret-type: Opaque
|
|
data: |
|
|
{
|
|
"auth": "${{ secrets.ADMIN_BASIC_AUTH_CREDENTIALS }}"
|
|
}
|
|
- name: Deploy
|
|
uses: azure/k8s-deploy@51ca02a8b7225fbd0924aac359c5b336a5f1e5b4 # v7.0.0
|
|
with:
|
|
action: deploy
|
|
manifests: "traefik/"
|
|
strategy: basic
|
|
namespace: kube-system
|