fix
This commit is contained in:
parent
c03360713f
commit
9d25fbc935
@ -26,16 +26,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build -t ${{ secrets.REGISTRY_URL }}/angular-app:${{ github.sha }} .
|
docker build -t ${{ secrets.REGISTRY_URL }}/hosting-frontend:${{ github.sha }} .
|
||||||
docker tag ${{ secrets.REGISTRY_URL }}/angular-app:${{ github.sha }} ${{ secrets.REGISTRY_URL }}/angular-app:latest
|
docker tag ${{ secrets.REGISTRY_URL }}/hosting-frontend:${{ github.sha }} ${{ secrets.REGISTRY_URL }}/hosting-frontend:latest
|
||||||
|
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||||
|
|
||||||
- name: Push Docker image
|
- name: Push Docker image
|
||||||
run: |
|
run: |
|
||||||
docker push ${{ secrets.REGISTRY_URL }}/angular-app:${{ github.sha }}
|
docker push ${{ secrets.REGISTRY_URL }}/hosting-frontend:${{ github.sha }}
|
||||||
docker push ${{ secrets.REGISTRY_URL }}/angular-app:latest
|
docker push ${{ secrets.REGISTRY_URL }}/hosting-frontend:latest
|
||||||
|
|
||||||
- name: Setup kubectl
|
- name: Setup kubectl
|
||||||
uses: azure/setup-kubectl@v3
|
uses: azure/setup-kubectl@v3
|
||||||
@ -50,20 +50,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Create ConfigMap for app files
|
- name: Create ConfigMap for app files
|
||||||
run: |
|
run: |
|
||||||
kubectl create configmap angular-app-files \
|
kubectl create configmap hosting-frontend-files \
|
||||||
--from-file=dist/your-angular-app/ \
|
--from-file=dist/hosting-frontend/browser \
|
||||||
--namespace=angular-app \
|
--namespace=hosting-frontend \
|
||||||
--dry-run=client -o yaml | kubectl apply -f -
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
|
|
||||||
- name: Create ConfigMap for nginx config
|
- name: Create ConfigMap for nginx config
|
||||||
run: |
|
run: |
|
||||||
kubectl create configmap nginx-config \
|
kubectl create configmap nginx-config \
|
||||||
--from-file=nginx.conf \
|
--from-file=nginx.conf \
|
||||||
--namespace=angular-app \
|
--namespace=hosting-frontend \
|
||||||
--dry-run=client -o yaml | kubectl apply -f -
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
|
|
||||||
- name: Deploy to k3s
|
- name: Deploy to k3s
|
||||||
run: |
|
run: |
|
||||||
kubectl apply -f k8s/
|
kubectl apply -f k8s/
|
||||||
kubectl set image deployment/angular-app angular-app=${{ secrets.REGISTRY_URL }}/angular-app:${{ github.sha }} -n angular-app
|
kubectl set image deployment/hosting-frontend hosting-frontend=${{ secrets.REGISTRY_URL }}/hosting-frontend:${{ github.sha }} -n hosting-frontend
|
||||||
kubectl rollout status deployment/angular-app -n angular-app
|
kubectl rollout status deployment/hosting-frontend -n hosting-frontend
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user