34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Build and deploy
|
|
run-name: 🚀
|
|
on: [push]
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Login to container registry
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
registry: https://git.vanespen.dev
|
|
username: ${{ secrets.USERNAME }}
|
|
password: ${{ secrets.PASSWORD }}
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: https://github.com/docker/setup-buildx-action@v3
|
|
- name: Build and push
|
|
uses: https://github.com/docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
pull: true
|
|
no-cache: true
|
|
tags: "git.vanespen.dev/evanespen/blog:latest"
|
|
- name: Setup Kubectl
|
|
run: |
|
|
mkdir ~/.kube
|
|
echo '${{ secrets.KUBECONFIG }}' > ~/.kube/config
|
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
|
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
|
/usr/local/bin/kubectl apply --validate=false -f argo.yaml
|