ci: switch to native path detection #76
@@ -0,0 +1,26 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'coredns/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy-coredns:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d # v5.1.0
|
||||
- uses: azure/k8s-set-context@8698eba2499e9012f0d5085f8798077cce4bc526 # v5.0.1
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
- name: Deploy
|
||||
run: |
|
||||
kubectl apply -n kube-system -f coredns
|
||||
- name: Restart coredns
|
||||
run: |
|
||||
kubectl -n kube-system rollout restart deployment coredns
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'node-labels/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy-node-labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d # v5.1.0
|
||||
- uses: azure/k8s-set-context@8698eba2499e9012f0d5085f8798077cce4bc526 # v5.0.1
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
- name: Deploy
|
||||
run: |
|
||||
kubectl apply --server-side --field-manager=t000-n -f node-labels
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'traefik/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy-traefik:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- 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
|
||||
@@ -7,99 +7,6 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check-changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
node-labels: ${{ steps.filter.outputs.node-labels }}
|
||||
coredns: ${{ steps.filter.outputs.coredns }}
|
||||
traefik: ${{ steps.filter.outputs.traefik }}
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
node-labels:
|
||||
- 'node-labels/**'
|
||||
coredns:
|
||||
- 'coredns/**'
|
||||
traefik:
|
||||
- 'traefik/**'
|
||||
|
||||
deploy-node-labels:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
if: ${{ needs.check-changes.outputs.node-labels == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d # v5.1.0
|
||||
- uses: azure/k8s-set-context@8698eba2499e9012f0d5085f8798077cce4bc526 # v5.0.1
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
- name: Deploy
|
||||
run: |
|
||||
kubectl apply --server-side --field-manager=t000-n -f node-labels
|
||||
|
||||
deploy-coredns:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
if: ${{ needs.check-changes.outputs.coredns == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d # v5.1.0
|
||||
- uses: azure/k8s-set-context@8698eba2499e9012f0d5085f8798077cce4bc526 # v5.0.1
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
- name: Deploy
|
||||
run: |
|
||||
kubectl apply -n kube-system -f coredns
|
||||
- name: Restart coredns
|
||||
run: |
|
||||
kubectl -n kube-system rollout restart deployment coredns
|
||||
|
||||
deploy-traefik:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
if: ${{ needs.check-changes.outputs.traefik == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- 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
|
||||
|
||||
deploy-docker-registry-secret:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-changes
|
||||
|
||||
Reference in New Issue
Block a user