Skip to content

Commit b2e50f0

Browse files
use kubectl to update deployments
1 parent e7eda0a commit b2e50f0

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
check:
1414
uses: ./.github/workflows/check.yml
1515
build:
16-
needs: [ check ]
16+
needs: [check]
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Correct env
@@ -38,7 +38,18 @@ jobs:
3838
with:
3939
context: .
4040
push: true
41-
tags: ghcr.io/${{ env.REPO }}:latest
41+
tags: ghcr.io/${{ env.REPO }}:latest,ghcr.io/${{ env.REPO }}:git-${{ github.sha }}
4242
platforms: linux/amd64
4343
cache-from: type=gha
44-
cache-to: type=gha,mode=max
44+
cache-to: type=gha,mode=max
45+
deploy:
46+
needs: [build]
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions-hub/kubectl@master
50+
env:
51+
KUBE_HOST: ${{ secrets.KUBE_HOST }}
52+
KUBE_CERTIFICATE: ${{ secrets.KUBE_CERTIFICATE }}
53+
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
54+
with:
55+
args: set image deployment/mcping mcping=ghcr.io/${{ env.REPO }}:git-${{ github.sha }}

0 commit comments

Comments
 (0)