Skip to content

Create Kubernetes deployment files (TODO: FIX) #3

Create Kubernetes deployment files (TODO: FIX)

Create Kubernetes deployment files (TODO: FIX) #3

# Based on Publish Docker Container by GitHub Actions
name: publish-dockerfile
on:
push:
branches: [ project-presentations ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login 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
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: dev
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
- name: Deploy to Kubernetes
run: kubectl apply -f kubernetes.yaml