Skip to content

Commit

Permalink
refactor github actions iteration=16 (#1057)
Browse files Browse the repository at this point in the history
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <[email protected]>
  • Loading branch information
NdibeRaymond authored Dec 22, 2023
1 parent 5f95580 commit 897d7b8
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/create_destroy_test_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,6 @@ jobs:
) && contains(github.event.pull_request.labels.*.name, 'create-test-vm') != true
runs-on: ubuntu-latest
steps:
- uses: unstructuredstudio/zubhub/.github/actions/comment_action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
message: |
@${{ github.actor }} is deleting test VM ...
- name: Get pr number and droplet ip
id: get_pr_number_and_droplet_ip
uses: unstructuredstudio/zubhub/.github/actions/doctl_action@master
Expand Down Expand Up @@ -340,6 +331,18 @@ jobs:
echo "DROPLET_IP=$DROPLET_IP" >> $COMPOSITE_OUTPUT
echo "DROPLET_NAME=$DROPLET_NAME" >> $COMPOSITE_OUTPUT
- uses: unstructuredstudio/zubhub/.github/actions/comment_action@master
env:
DROPLET_IP: ${{ fromJson(steps.get_pr_number_and_droplet_ip.outputs.JSON_STRING).DROPLET_IP }}
if: ${{ env.DROPLET_IP != '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
message: |
@${{ github.actor }} is deleting test VM ...
- name: delete DNS records and test droplet
uses: unstructuredstudio/zubhub/.github/actions/doctl_action@master
env:
Expand Down Expand Up @@ -368,6 +371,9 @@ jobs:
fi
- uses: unstructuredstudio/zubhub/.github/actions/comment_action@master
env:
DROPLET_IP: ${{ fromJson(steps.get_pr_number_and_droplet_ip.outputs.JSON_STRING).DROPLET_IP }}
if: ${{ env.DROPLET_IP != '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
Expand Down

0 comments on commit 897d7b8

Please sign in to comment.