Web application preview environment deletion on branch delete #48
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: 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 }} |