Skip to content

Commit

Permalink
Roll deleted pubcode cleanup into scheduled.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Jan 18, 2024
1 parent 8057975 commit 6f82929
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 138 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/remove-deleted-repos.yaml

This file was deleted.

96 changes: 0 additions & 96 deletions .github/workflows/schedule-jobs.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,37 @@ jobs:
# Create a Pull Request
gh pr create --assignee "mishraomp" --base main --label "chore" --title "Updating the Schema as changes to ministry names were detected." --body "Updating the Schema as changes to ministry names were detected."
soft-delete-removed-pubcodes:
name: Soft Delete pubcodes In the Databse which are removed from the repo.
runs-on: ubuntu-22.04
defaults:
run:
working-directory: utilities/remove-deleted-pubcode
environment: prod
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Add Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install Dependencies
run: npm ci

- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Process script
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ vars.OC_SERVER }}
oc project ${{ vars.OC_NAMESPACE }}
# Get API key
API_KEY=$(oc get secrets/pubcode --template={{.data.API_KEY}} | base64 -d)
API_URL=https://$(oc get route/pubcode-api --template={{.spec.host}})
API_KEY="${API_KEY}" API_URL="${API_URL}" node index.js

0 comments on commit 6f82929

Please sign in to comment.