Skip to content

Commit

Permalink
create new workflow to reset demo pod replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 19, 2024
1 parent 092a325 commit 400ae25
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/reset-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Staging-Deploy'

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: Build and push image to ECR
steps:
- 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: oc scale deployment ${{ env.POD_NAME }} --replicas 0

0 comments on commit 400ae25

Please sign in to comment.