Skip to content

Commit

Permalink
Manual sync template & workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf committed Sep 20, 2023
1 parent 7eae065 commit 11b14c1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/manual_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Manually Sync Listmonk

on:
workflow_dispatch:

jobs:
manual_sync:
runs-on: ubuntu-latest
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 create -f kubernetes/manual_sync.yml
18 changes: 18 additions & 0 deletions kubernetes/manual_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: listmonk-sync-job-
spec:
template:
metadata:
name: listmonk-sync
spec:
containers:
- name: listmonk-sync
image: ghcr.io/zooniverse/listmonk-sync
envFrom:
- secretRef:
name: listmonk-sync-env-vars
command: ['ruby', 'sync.rb']
restartPolicy: Never
backoffLimit: 2

0 comments on commit 11b14c1

Please sign in to comment.