Remove old workflow files and keep only build-and-deploy.yaml
This commit is contained in:
parent
025e0b8cd4
commit
d0cdfbfa55
2 changed files with 0 additions and 93 deletions
53
.github/workflows/deploy.yaml
vendored
53
.github/workflows/deploy.yaml
vendored
|
|
@ -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
|
||||
40
.github/workflows/docker.yml
vendored
40
.github/workflows/docker.yml
vendored
|
|
@ -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
|
||||
Loading…
Reference in a new issue