Build production #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |