ci: use unique image tags (git sha)
This commit is contained in:
@@ -32,9 +32,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build & Push Docker image
|
- name: Build & Push Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build -t $REGISTRY/$APP:${{ inputs.environment }} .
|
TAG=${{ github.sha }}
|
||||||
|
docker build -t $REGISTRY/$APP:$TAG -t $REGISTRY/$APP:${{ inputs.environment }} .
|
||||||
|
docker push $REGISTRY/$APP:$TAG
|
||||||
docker push $REGISTRY/$APP:${{ inputs.environment }}
|
docker push $REGISTRY/$APP:${{ inputs.environment }}
|
||||||
|
|
||||||
- name: Deploy to K8s
|
- name: Deploy to K8s
|
||||||
run: |
|
run: |
|
||||||
kubectl rollout restart deployment/$APP -n lpt-${{ inputs.environment }}
|
TAG=${{ github.sha }}
|
||||||
|
kubectl set image deployment/$APP $APP=$REGISTRY/$APP:$TAG -n lpt-${{ inputs.environment }}
|
||||||
|
kubectl rollout status deployment/$APP -n lpt-${{ inputs.environment }}
|
||||||
|
|||||||
Reference in New Issue
Block a user