From d0cdfbfa5536622eaef9c15b7d80a9b50f674ae8 Mon Sep 17 00:00:00 2001 From: Keyvan Ebrahimpour Date: Fri, 11 Apr 2025 08:44:44 +0000 Subject: [PATCH] Remove old workflow files and keep only build-and-deploy.yaml --- .github/workflows/deploy.yaml | 53 ----------------------------------- .github/workflows/docker.yml | 40 -------------------------- 2 files changed, 93 deletions(-) delete mode 100644 .github/workflows/deploy.yaml delete mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index 579be40..0000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# .github/workflows/deploy.yaml - -name: Build and Deploy to Kubernetes - -#on: -# push: -# branches: [ main ] - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Debug Variables - run: echo "Repository: ${{ github.repository }}" - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and Push Docker Image - run: | - IMAGE_NAME="ghcr.io/${{ github.repository }}" - docker build -t "$IMAGE_NAME:latest" . - docker push "$IMAGE_NAME:latest" - shell: bash - - - name: Set up Kubeconfig - run: | - mkdir -p ~/.kube - echo "${{ secrets.KUBECONFIG_BASE64 }}" | base64 -d > ~/.kube/config - chmod 600 ~/.kube/config - - - name: Deploy to Kubernetes - run: | - kubectl set image deployment/homepage homepage=ghcr.io/${{ github.repository }}:latest -n web - - - name: Set up kubeconfig - run: | - mkdir -p ~/.kube - echo "${{ secrets.KUBECONFIG_BASE64 }}" | base64 -d > ~/.kube/config - chmod 600 ~/.kube/config - env: - KUBECONFIG: ~/.kube/config diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index b3df33f..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build and Push Docker Image - -#on: -# push: -# branches: [ main ] - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and Push Docker Image - run: | - IMAGE="ghcr.io/${{ github.repository }}" - docker build -t "$IMAGE:latest" . - docker push "$IMAGE:latest" - - - name: Set up Kubeconfig - run: | - mkdir -p ~/.kube - echo "${{ secrets.KUBECONFIG_BASE64 }}" | base64 -d > ~/.kube/config - chmod 600 ~/.kube/config - env: - KUBECONFIG: ~/.kube/config - - - name: Deploy to Kubernetes - run: | - IMAGE="ghcr.io/${{ github.repository }}" - kubectl set image deployment/homepage homepage=$IMAGE:latest -n web