Skip to content

feat: default period is no more automatically added [DHIS2-16052] #24

feat: default period is no more automatically added [DHIS2-16052]

feat: default period is no more automatically added [DHIS2-16052] #24

name: Destroy instance
on:
pull_request:
types: [closed]
# Cancel previous runs of the same workflow and PR number or branch/tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
destroy-instance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: dhis2-sre/im-manager
sparse-checkout: scripts/instances
- name: Install HTTPie
run: python -m pip install httpie
- name: Destroy DHIS2 instance
working-directory: scripts/instances
env:
HTTP: https --check-status
USER_EMAIL: ${{ secrets.IM_BOT_EMAIL }}
PASSWORD: ${{ secrets.IM_BOT_PASSWORD }}
IM_HOST: 'https://api.im.dhis2.org'
INSTANCE_NAME: pr-${{ github.event.number }}
run: ./findByName.sh dev $INSTANCE_NAME && ./destroy.sh dev $INSTANCE_NAME