ci: strip dash if master #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |