Skip to content

trigger scaling

trigger scaling #5

Workflow file for this run

name: 'Reset Demo instances'
on:
push:
env:
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }}
OPENSHIFT_TOKEN: ${{ secrets.OPENSHIFT_TOKEN }}
OPENSHIFT_NAMESPACE: "pitc-okr-demo"
POD_NAME: "demo-okr-application"
jobs:
reset-demo:
runs-on: ubuntu-24.04
name: Scale down and restart demo application
steps:
- name: Install CLI tools from GitHub
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.15"
- name: Log in to OpenShift
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ env.OPENSHIFT_SERVER }}
openshift_token: ${{ env.OPENSHIFT_TOKEN }}
namespace: ${{ env.OPENSHIFT_NAMESPACE }}
- name: set pod replicas to 0 and trigger auto restart
run: |
echo "test"
oc projects
oc project
echo "${{ env.OPENSHIFT_NAMESPACE }}"
echo "${{ env.POD_NAME }}"
oc project ${{ env.OPENSHIFT_NAMESPACE }}
oc project
oc scale deployment demo-okr-application --replicas 0