Use azure kubectl action and execute directly
Some checks failed
/ image_build (push) Failing after 1m33s
Some checks failed
/ image_build (push) Failing after 1m33s
This commit is contained in:
22
.github/workflows/build.yaml
vendored
22
.github/workflows/build.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
- name: Docker buildx setup
|
- name: Docker buildx setup
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Gitea OCI repo login
|
- name: Login to Gitea artifact repository
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.tymur999.com
|
registry: gitea.tymur999.com
|
||||||
@@ -29,9 +29,19 @@ jobs:
|
|||||||
gitea.tymur999.com/tymur999/blog:latest
|
gitea.tymur999.com/tymur999/blog:latest
|
||||||
gitea.tymur999.com/tymur999/blog:nightly
|
gitea.tymur999.com/tymur999/blog:nightly
|
||||||
gitea.tymur999.com/tymur999/blog:${{ github.sha }}
|
gitea.tymur999.com/tymur999/blog:${{ github.sha }}
|
||||||
- name: Update kubernetes deployment with new image
|
|
||||||
uses: actions-hub/kubectl@master
|
- name: Install and setup kubectl
|
||||||
env:
|
uses: azure/setup-kubectl@v4
|
||||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
|
||||||
with:
|
with:
|
||||||
args: set image deployments/blog nginx=gitea.tymur999.com/tymur999/blog:${{ github.sha }}
|
version: 'latest'
|
||||||
|
|
||||||
|
- name: Configure kubectl
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.kube
|
||||||
|
echo "${{ secrets.KUBECONFIG }}" | base64 -d > $HOME/.kube/config
|
||||||
|
chmod 600 $HOME/.kube/config
|
||||||
|
|
||||||
|
- name: Deploy to cluster
|
||||||
|
run: |
|
||||||
|
kubectl set image deployments/blog nginx=gitea.tymur999.com/tymur999/blog:${{ github.sha }}
|
||||||
|
kubectl rollout status deployments/blog
|
||||||
|
|||||||
Reference in New Issue
Block a user