Skip to content

Web application preview environment deletion on branch delete #48

Web application preview environment deletion on branch delete

Web application preview environment deletion on branch delete #48

name: Web application preview environment deletion on branch delete
on:
delete
jobs:
trigger-circleci:
if: github.event.ref_type == 'branch'
name: Trigger CircleCI web_app_preview_deletion workflow
runs-on: ubuntu-latest
steps:
- name: Trigger CircleCI workflow
uses: promiseofcake/circleci-trigger-action@v1
with:
# Branch from environment does not exists anymore, workflow will run from dev branch
branch: dev
payload: '{"trigger_workflow": "web_app_preview_deletion", "preview_deletion_branch": "${{ github.event.ref }}"}'
user-token: ${{ secrets.CIRCLE_CI_TOKEN }}