-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (38 loc) · 1.17 KB
/
build-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build production
on:
release:
types: [created]
jobs:
build-docker-image-production:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push pacifista-website pterodactyl dockerfile
run: |
docker build . --tag ghcr.io/pacifistamc/pacifista-website:latest
docker push ghcr.io/pacifistamc/pacifista-website:latest
update-kubernetes-cluster:
needs:
- build-docker-image-production
runs-on: ubuntu-latest
steps:
- name: Set up kubectl
uses: azure/k8s-set-context@v3
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
- name: Checkout source code
uses: actions/checkout@v3
- name: Update Kubernetes Cluster
run: cd kubernetes && chmod +x ./deploy.sh && ./deploy.sh