Prepare for transip #73
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
on: | |
push: | |
branches: | |
- transip | |
jobs: | |
build: | |
name: Build Docker images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repo | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: daanvm | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push daanvm.nl-nginx | |
id: docker_build_daanvm_nl_nginx | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile-nginx | |
push: true | |
tags: daanvm/daanvm.nl-nginx:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Build and push daanvm.nl-php | |
id: docker_build_daanvm_nl_php | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ | |
file: ./Dockerfile-php | |
push: true | |
tags: daanvm/daanvm.nl-php:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
deploy-kubernetes: | |
name: Create Kubernetes resources | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v3 | |
- name: Create kubernetes resources | |
uses: wahyd4/kubectl-helm-action@master | |
env: | |
KUBE_CONFIG_DATA: ${{ secrets.TRANSIP_KUBECONFIG_BASE64 }} | |
with: | |
args: | | |
kubectl apply -f daanvm.nl.yaml | |
kubectl rollout restart deployment daanvm-nl | |
kubectl rollout restart deployment daanvm-nl-php |