Skip to content

Commit

Permalink
Replace workflow with post_rollout param
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Oct 2, 2024
1 parent 82f6b73 commit a1fb7e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 44 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/.backup.yml

This file was deleted.

16 changes: 5 additions & 11 deletions .github/workflows/.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ jobs:
${{ github.event_name == 'pull_request' && '-p MEMORY_LIMIT=200Mi' || '' }}

- name: Deploy Database Backup
if: steps.triggers.outputs.core == 'true' || steps.triggers.outputs.sync == 'true'
env:
CRONJOB: ${{ github.event.repository.name }}-${{ inputs.target }}-database-backup
uses: bcgov-nr/[email protected]
with:
file: common/openshift.backup.yml
Expand All @@ -114,17 +117,8 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
oc_version: "4.13"
overwrite: true
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PG_DB_IMAGE=postgis/postgis:15-master

- name: Backup
if: steps.triggers.outputs.core == 'true' || steps.triggers.outputs.sync == 'true'
secrets: inherit
uses: ./.github/workflows/.deploy.yml
with:
environment: ${{ inputs.environment }}
target: ${{ inputs.target }}
parameters: -p ZONE=${{ env.ZONE }} -p PG_DB_IMAGE=postgis/postgis:15-master
post_rollout: oc create job --from=cronjob/${{ env.CRONJOB }} ${{ env.CRONJOB }}-$(date +%Y%m%d%H%M%S)

deploy:
name: Deploy
Expand Down

0 comments on commit a1fb7e4

Please sign in to comment.