Skip to content

Add Ecological Units to Survey Focal Species #25

Add Ecological Units to Survey Focal Species

Add Ecological Units to Survey Focal Species #25

Workflow file for this run

# Switch to Draft
# Scales down running PODS when switching to Draft
name: Draft Scale Down
on:
pull_request:
types: [converted_to_draft]
jobs:
scaleDownPods:
name: Scale down the pods for this PR
runs-on: ubuntu-latest
timeout-minutes: 20
env:
PR_NUMBER: ${{ github.event.number }}
steps:
# Log in to OpenShift.
# Note: The secrets needed to log in are NOT available if the PR comes from a FORK.
# PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail.
- name: Log in to OpenShift
run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443
- name: Scale down
run: oc get deploymentconfig --namespace af2668-dev --selector env-id=$PR_NUMBER -o name | awk '{print "oc scale --replicas=0 " $1}' | bash