-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update to MorphoCloud/MorphoCloudWorkflow@39f04ff
List of MorphoCloudWorkflow changes: ``` $ git shortlog 831e698..39f04ff --no-merges Jean-Christophe Fillion-Robin (1): feat: Add support for /delete_all command ``` See MorphoCloud/MorphoCloudWorkflow@831e698...39f04ff
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Delete Instance and Volume | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
delete_instance_and_volume: | ||
runs-on: self-hosted | ||
if: | ||
${{ !github.event.issue.pull_request && ( | ||
contains(github.event.comment.body, '/delete_all') ) }} | ||
steps: | ||
- name: delete_instance_and_volume command | ||
id: delete_instance_and_volume_command | ||
uses: github/[email protected] | ||
with: | ||
command: "/delete_all" | ||
reaction: "rocket" | ||
allowed_contexts: "issue" | ||
permissions: "write,maintain,admin" | ||
allowlist: "${{ vars.MORPHOCLOUD_GITHUB_ADMINS }}" | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Delete volume | ||
id: delete_volume | ||
if: | ||
${{ steps.delete_instance_and_volume_command.outputs.continue == | ||
'true' }} | ||
uses: ./.github/actions/delete-volume | ||
with: | ||
os_cloud: ${{ vars.MORPHOCLOUD_OS_CLOUD }} | ||
issue_number: ${{ github.event.issue.number }} | ||
instance_name_prefix: ${{ vars.INSTANCE_NAME_PREFIX }} | ||
volume_name_suffix: ${{ vars.VOLUME_NAME_SUFFIX }} | ||
|
||
- name: Delete instance | ||
id: delete_instance | ||
if: | ||
${{ steps.delete_instance_and_volume_command.outputs.continue == | ||
'true' }} | ||
uses: ./.github/actions/control-instance | ||
with: | ||
os_cloud: ${{ vars.MORPHOCLOUD_OS_CLOUD }} | ||
issue_number: ${{ github.event.issue.number }} | ||
command_name: "delete" | ||
instance_name_prefix: ${{ vars.INSTANCE_NAME_PREFIX }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
string_encryption_key: ${{ secrets.STRING_ENCRYPTION_KEY }} | ||
mail_server_username: ${{secrets.MAIL_USERNAME}} | ||
mail_server_password: ${{secrets.MAIL_PASSWORD}} |
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