Restart Mailhog service #10
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: 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 |