-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.08 KB
/
cron_deploy.yaml
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
name: Deploy Hotmail Processing Cron Task
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build_and_push_image:
name: Build and Push Image
uses: zooniverse/ci-cd/.github/workflows/build_and_push_image.yaml@main
with:
repo_name: hotmail-complaint-processor
commit_id: ${{ github.sha }}
latest: true
deploy_cron:
runs-on: ubuntu-latest
needs: build_and_push_image
steps:
- name: Checkout
uses: actions/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_AKS }}
- name: Set the target AKS cluster
uses: Azure/aks-set-context@v3
with:
cluster-name: microservices
resource-group: kubernetes
- name: Modify & apply template
run: |
kubectl delete cronjob hotmail-complaint-processor-cronjob
kubectl create -f kubernetes/cron_script.yml