-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from FalkorDB/159-add-tests-for-private-insta…
…nces added tests for private instances
- Loading branch information
Showing
12 changed files
with
150 additions
and
20 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,33 @@ | ||
name: Cleanup running runner | ||
description: Cleans a spot instance that has the specified label | ||
|
||
inputs: | ||
service_account_key: | ||
description: GCP Service account key | ||
required: true | ||
project_id: | ||
description: GCP Project ID | ||
required: true | ||
zone: | ||
description: GCP Zone | ||
required: true | ||
instance_label: | ||
description: Label to identify the instance | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: auth | ||
shell: bash | ||
run: echo '${{ inputs.service_account_key }}' | gcloud --project '${{ inputs.project_id }}' --quiet auth activate-service-account --key-file - >/dev/null 2>&1 | ||
- id: get-runner-id-and-kill-runner | ||
shell: bash | ||
run: | | ||
runner_id=$(gcloud compute instances list --filter=labels=${{ inputs.instance_label }} | awk '{print $1}' | tail +2) | ||
if [ -z "$runner_id" ]; then | ||
echo "Instance with label ${{ inputs.instance_label }} not found" | ||
exit 0 | ||
fi | ||
echo "runner_id=$runner_id" >> $GITHUB_OUTPUT | ||
gcloud compute instances delete $runner_id --zone=${{ inputs.zone }} --quiet |
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
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
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
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
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
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
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
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
Oops, something went wrong.