Skip to content

Commit

Permalink
add github action1
Browse files Browse the repository at this point in the history
  • Loading branch information
oneinstepGO committed Sep 5, 2024
1 parent 2292770 commit 5557a57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-latest

env:
BACKEND_IMAGE: ${{ secrets.DOCKER_USERNAME }}/k8s-backend:1.0
FRONTEND_IMAGE: ${{ secrets.DOCKER_USERNAME }}/k8s-frontend:1.0
BACKEND_IMAGE: ${{ vars.DOCKER_USERNAME }}/k8s-backend:1.0
FRONTEND_IMAGE: ${{ vars.DOCKER_USERNAME }}/k8s-frontend:1.0

steps:
- name: Checkout code
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push backend image
Expand All @@ -47,7 +47,7 @@ jobs:
# env:
# KUBECONFIG: ${{ secrets.KUBECONFIG }}
# run: |
# sed -i "s|<your_docker_hub_username>|${{ secrets.DOCKER_USERNAME }}|g" k8s-backend/backend-deployment.yaml
# sed -i "s|<your_docker_hub_username>|${{ secrets.DOCKER_USERNAME }}|g" k8s-frontend/frontend-deployment.yaml
# sed -i "s|<your_docker_hub_username>|${{ vars.DOCKER_USERNAME }}|g" k8s-backend/backend-deployment.yaml
# sed -i "s|<your_docker_hub_username>|${{ vars.DOCKER_USERNAME }}|g" k8s-frontend/frontend-deployment.yaml
# kubectl apply -f k8s-backend/backend-deployment.yaml
# kubectl apply -f k8s-frontend/frontend-deployment.yaml

0 comments on commit 5557a57

Please sign in to comment.