Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
List of MorphoCloudWorkflow changes:

```
$ git shortlog bb0e32f..15bc17c --no-merges
Jean-Christophe Fillion-Robin (6):
      feat: Add support for synchronous update of instance status issue label
      fix(update-request-status-label): Remove redundant "repository" input
      fix(action/update-request-status-label): Handle case when server is "deleted"
      fix(action/update-request-status-label): Explicitly set "deleted" state after instance removal
      fix(create-instance): Add comment if instance request status label update failed
      fix(action/update-request-status-label): Fix automatic status retrieval
```

See MorphoCloud/MorphoCloudWorkflow@bb0e32f...15bc17c
  • Loading branch information
jcfr committed Sep 24, 2024
1 parent 9e3edea commit d42ecc4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/actions/control-instance/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,13 @@ runs:
`${{ inputs.command_name }}` command successfully applied to **${{ steps.define.outputs.instance_name }}** instance.
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Update Request Status Label
uses: ./.github/actions/update-request-status-label
with:
os_cloud: ${{ inputs.os_cloud }}
token: ${{ inputs.token }}
issue_number: ${{ inputs.issue_number }}
instance_name: ${{ steps.define.outputs.instance_name }}
instance_status:
${{ inputs.command_name == 'delete' && 'DELETED' || '' }}
8 changes: 5 additions & 3 deletions .github/actions/update-request-status-label/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ inputs:
description: "GITHUB_TOKEN or repo scoped PAT"
required: true
issue_number:
description: "Issue number"
description:
"The GitHub issue number that corresponds to the instance request."
required: true
instance_name:
description: "Instance name"
description:
"The name of the instance for which the status is being updated."
required: true
instance_status:
description: |
Expand All @@ -24,7 +26,7 @@ runs:
steps:
- name: Retrieve instance status
id: retrieve_instance_status
if: ${{ inputs.instance_status != '' }}
if: ${{ inputs.instance_status == '' }}
shell: bash
run: |
source ~/venv/bin/activate
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/create-instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,29 @@ jobs:
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Update Request Status Label
id: update-request-status-label
uses: ./.github/actions/update-request-status-label
with:
os_cloud: ${{ vars.MORPHOCLOUD_OS_CLOUD }}
token: ${{ secrets.GITHUB_TOKEN }}
instance_name: ${{ steps.define.outputs.instance_name }}
issue_number: ${{ github.event.issue.number }}

- name: comment (failed to update request status label)
if:
${{ steps.update-request-status-label.outcome == 'failure' &&
failure() }}
uses: peter-evans/[email protected]
with:
issue-number: ${{ github.event.issue.number }}
body: |
### Instance Creation Results ❌
Failed to update request status label for instance **${{ steps.define.outputs.instance_name }}**.
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: comment (progress)
uses: ./.github/actions/comment-progress
with:
Expand Down

0 comments on commit d42ecc4

Please sign in to comment.