Merge pull request #3 from zooniverse/cron-delete-old #3
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: 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 hotmail-complaint-processor-cronjob | |
kubectl create -f kubernetes/cron_script.yml |