Supprimer .forgejo / workflows / deploy.yml
This commit is contained in:
parent
cb55865cc7
commit
031ccd0e0b
1 changed files with 0 additions and 45 deletions
|
|
@ -1,45 +0,0 @@
|
|||
name: Deploy to Kubernetes
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
deploy-to-k8s:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout du code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Installer kubectl
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y curl
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
chmod +x kubectl
|
||||
mv kubectl /usr/local/bin/
|
||||
|
||||
- name: Déployer sur Kubernetes
|
||||
uses: docker://bitnami/kubectl:latest
|
||||
env:
|
||||
KUBECONFIG_DATA: ${{ secrets.KUBECONFIG_DATA }}
|
||||
IMAGE_NAME: grafana/grafana
|
||||
with:
|
||||
entrypoint: /bin/sh
|
||||
args: |
|
||||
-c "
|
||||
# Nettoyer les retours à la ligne et les caractères spéciaux
|
||||
#cat <<EOF > /tmp/kubeconfig.yaml
|
||||
#$KUBECONFIG_DATA
|
||||
#EOF
|
||||
cp kubeconfig.yaml > /tmp/kubeconfig.yaml &&
|
||||
#echo "$KUBECONFIG_DATA" > /tmp/kubeconfig.yaml &&
|
||||
export KUBECONFIG=/tmp/kubeconfig.yaml &&
|
||||
kubectl config view --raw &&
|
||||
cat /tmp/kubeconfig.yaml &&
|
||||
kubectl get pods &&
|
||||
kubectl set image deployment/grafana grafana=${IMAGE_NAME}:${GITHUB_REF_NAME} &&
|
||||
kubectl rollout status deployment/grafana
|
||||
"
|
||||
Loading…
Reference in a new issue