Skip to content

stack-spot/runtime-cancel-run-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

runtime-cancel-run-action

Action test Ubuntu Action test MacOS Action test Windows

GitHub action to cancel a run on StackSpot Runtime API.

Note: This action is supported on all runners operating systems (ubuntu, macos, windows)

📚 Usage

Requirements

To get the account keys (CLIENT_ID, CLIENT_KEY and CLIENT_REALM), please login using a ADMIN user on the StackSpot Portal, and generate new keys at https://stackspot.com/en/settings/access-token.

Use Case

    steps:
      - uses: stack-spot/runtime-cancel-run-action@v1    
        outputs:
          run_data: <workdir>/run_data_output.json
        with:
          CLIENT_ID: ${{ secrets.CLIENT_ID }}
          CLIENT_KEY: ${{ secrets.CLIENT_KEY }}
          CLIENT_REALM: ${{ secrets.CLIENT_REALM }}
          RUN_ID: ${{ needs.run.outputs.run_id }}
          FORCE_CANCEL: true

▶️ Action Inputs

Field Mandatory Default Value Observation
CLIENT_ID YES N/A StackSpot Client ID.
CLIENT_KEY YES N/A StackSpot Client KEY.
CLIENT_REALM YES N/A StackSpot Client Realm.
RUN_ID YES N/A Run Id generated by Runtime Manager Action.
FORCE_CANCEL YES true Forces the cancel in case Jobs/Workers will no longer respond Run Tasks.

▶️ Action Outputs

Field Description
run_data Returns json file output with the run data after its cancelled. At /{{workdir}}/run_data_output.json
Output run_data json file structure
{
  "runId": "string",
  "appId": "string",
  "infraId": "string",
  "envId": "string",
  "deploymentId": "string",
  "type": "DEPLOY",
  "status": "RUNNING",
  "createdAt": "2024-09-27T21:16:23.993Z",
  "updatedAt": "2024-09-27T21:16:23.993Z",
  "appliedPlugins": [
    {
      "pluginAppliedAlias": "string",
      "tasks": [
        {
          "id": "string",
          "type": "IAC",
          "status": "PENDING",
          "errorDetails": "string",
          "logs": "string"
        }
      ]
    }
  ]
}

License

Apache License 2.0