Skip to content

Restart Mailhog service #91

Restart Mailhog service

Restart Mailhog service #91

name: Restart Mailhog service
on:
schedule:
# At 23:30 every day.
- cron: "30 23 * * *"
jobs:
restart-mailhog:
runs-on: ubuntu-20.04
if: github.repository == 'bcgov/sbc-auth'
environment:
name: "dev"
steps:
- uses: actions/checkout@v3
- name: Login Openshift and Restart mailhog
run: |
oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}}
oc scale --replicas=0 deployment/mailhog -n ${{ secrets.OPENSHIFT4_REPOSITORY }}-dev
oc scale --replicas=1 deployment/mailhog -n ${{ secrets.OPENSHIFT4_REPOSITORY }}-dev