Skip to content

PIDP-1011 Linking Accounts Error fix + Business events #34

PIDP-1011 Linking Accounts Error fix + Business events

PIDP-1011 Linking Accounts Error fix + Business events #34

name: Remove Helm deployment on PR merge - Gold
on:
workflow_dispatch:
pull_request:
types: [closed]
branches-ignore:
- 'test'
- 'master'
jobs:
remove-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1.1
with:
openshift_server_url: ${{secrets.GOLD_OPENSHIFT_CLUSTER_URL}}
openshift_token: ${{secrets.GOLD_PIPELINE_SERVICE_ACCOUNT_TOKEN}}
- name: Remove Helm deployment
run: |
helm uninstall pr-${{ github.event.number }} --namespace f088b1-dev
- name: Remove PR imagestream
run: |
oc tag -d pidp-frontend:pr-${{ github.event.number }} -n f088b1-tools
oc tag -d pidp-plr-intake:pr-${{ github.event.number }} -n f088b1-tools
oc tag -d pidp-webapi:pr-${{ github.event.number }} -n f088b1-tools
merge_job:
# this job will only run if the PR has been merged
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- run: |
echo PR #${{ github.event.number }} has been merged
close_job:
# this job will only run if the PR has been closed without being merged
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- run: |
echo PR #${{ github.event.number }} has been closed without being merged