Skip to content

Commit

Permalink
Tadhg/taskify dissemination destruction (#2542)
Browse files Browse the repository at this point in the history
* First pass at GitHub Action for destroying and regenerating the dissemination database.

* rename file

* Test dissemination on dev via workflow

* Rollback testing changes

* Enable github actor restriction

This is constrained to just Tadhg and Dan for now. Can be removed at any point

---------

Co-authored-by: Alex Steel <[email protected]>
  • Loading branch information
tadhg-ohiggins and asteel-gsa authored Oct 18, 2023
1 parent b742efe commit 65e0c54
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/destroy-and-regenerate-dissemination.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: "Task: run Django command to delete and then regenerate all dissemination objects"
on:
workflow_dispatch:
inputs:
environment:
required: true
type: string
# dev, staging, production

jobs:
destroy-and-regenerate-dissemination-objects:
if: contains('["tadhg-ohiggins","danswick"]', github.actor)
name: Destroy and regenerate dissemination objects in ${{ inputs.environment }} database
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
env:
space: ${{ inputs.environment }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Django command to destroy and regenerate dissemination objects in ${{ inputs.environment }}
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf run-task gsa-fac -k 2G -m 2G --name rebuild_dissemination --command "python manage.py delete_and_regenerate_dissemination_from_intake"

0 comments on commit 65e0c54

Please sign in to comment.