ci: use unique image tags (git sha)
This commit is contained in:
@@ -23,10 +23,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Build & Push Docker image
|
- name: Build & Push Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build --build-arg BUILD_MODE=${{ inputs.environment == 'prod' && 'production' || 'development' }} \
|
TAG=${{ github.sha }}
|
||||||
|
docker build \
|
||||||
|
--build-arg BUILD_MODE=${{ inputs.environment == 'prod' && 'production' || 'development' }} \
|
||||||
|
-t $REGISTRY/$APP:$TAG \
|
||||||
-t $REGISTRY/$APP:${{ inputs.environment }} .
|
-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