feat-add-docker-registry-token #41
@@ -15,7 +15,7 @@ jobs:
|
|||||||
traefik: ${{ steps.filter.outputs.traefik }}
|
traefik: ${{ steps.filter.outputs.traefik }}
|
||||||
crowdsec: ${{ steps.filter.outputs.crowdsec }}
|
crowdsec: ${{ steps.filter.outputs.crowdsec }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
needs: check-changes
|
needs: check-changes
|
||||||
if: ${{ needs.check-changes.outputs.node-labels == 'true' || github.event_name == 'workflow_dispatch' }}
|
if: ${{ needs.check-changes.outputs.node-labels == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
needs: check-changes
|
needs: check-changes
|
||||||
if: ${{ needs.check-changes.outputs.coredns == 'true' || github.event_name == 'workflow_dispatch' }}
|
if: ${{ needs.check-changes.outputs.coredns == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
@@ -135,5 +135,27 @@ jobs:
|
|||||||
uses: helmfile/helmfile-action@f64d5db9f8660aae0205b5fcfc56577d44acefab # v2.1.0
|
uses: helmfile/helmfile-action@f64d5db9f8660aae0205b5fcfc56577d44acefab # v2.1.0
|
||||||
with:
|
with:
|
||||||
helmfile-args: apply
|
helmfile-args: apply
|
||||||
helm-plugins: https://github.com/databus23/helm-diff@v3.12.0
|
|
||||||
helmfile-workdirectory: "crowdsec"
|
helmfile-workdirectory: "crowdsec"
|
||||||
|
|
||||||
|
deploy-docker-registry-secret:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: check-changes
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
||||||
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
|
with:
|
||||||
|
method: kubeconfig
|
||||||
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
|
- name: Set docker registry credentials
|
||||||
|
run: |
|
||||||
|
kubectl create secret docker-registry regcred-dockerhub \
|
||||||
|
--docker-server=https://index.docker.io/v1/ \
|
||||||
|
--docker-username="${{ secrets.DOCKER_USERNAME }}" \
|
||||||
|
--docker-password="${{ secrets.DOCKER_PASSWORD }}" \
|
||||||
|
--docker-email="${{ secrets.DOCKER_EMAIL }}" \
|
||||||
|
--namespace=default \
|
||||||
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
|
- name: Configure image pull secret globally
|
||||||
|
run: |
|
||||||
|
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred-dockerhub"}]}'
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
validate-node-lables:
|
validate-node-lables:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
validate-coredns:
|
validate-coredns:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
@@ -66,5 +66,4 @@ jobs:
|
|||||||
uses: helmfile/helmfile-action@f64d5db9f8660aae0205b5fcfc56577d44acefab # v2.1.0
|
uses: helmfile/helmfile-action@f64d5db9f8660aae0205b5fcfc56577d44acefab # v2.1.0
|
||||||
with:
|
with:
|
||||||
helmfile-args: diff
|
helmfile-args: diff
|
||||||
helm-plugins: https://github.com/databus23/helm-diff@v3.12.0
|
|
||||||
helmfile-workdirectory: "crowdsec"
|
helmfile-workdirectory: "crowdsec"
|
||||||
|
|||||||
Reference in New Issue
Block a user