VSCode + java updates #592
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: Delete the staging environment | |
on: | |
pull_request_target: | |
types: | |
- closed | |
repository_dispatch: | |
types: | |
- undeploy-staging-command | |
jobs: | |
dispatch-deletion-request: | |
name: Dispatch the deletion request | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the PR number | |
id: pr-number | |
run: | | |
[[ "${{ github.event_name }}" == "pull_request_target" ]] && \ | |
echo "number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT || \ | |
echo "number=${{ github.event.client_payload.github.payload.issue.number }}" >> $GITHUB_OUTPUT | |
- name: Notify Event to CrownOps | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.CI_TOKEN }} | |
repository: netgroup-polito/CrownOps | |
event-type: undeploy-staging-event | |
client-payload: | | |
{ | |
"repository": "${{ github.repository }}", | |
"pr-number": "${{ steps.pr-number.outputs.number }}" | |
} | |
- name: Report status as reaction | |
uses: peter-evans/create-or-update-comment@v2 | |
with: | |
token: ${{ secrets.CI_TOKEN }} | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | |
reactions: 'hooray' | |
if: github.event_name == 'repository_dispatch' |