This repo contains custom GitHub Actions that enable support for starting and stopping maintenance windows within our Site24x7 uptime monitoring, so that any downtime during a deployment is marked as having occurred during maintenance.
Use this action to start a maintenance window.
| Parameter | Description |
|---|---|
app-url |
See below. |
app-key |
See below. |
monitor-id |
The ID of the monitor that should be suspended during the maintenance window. This will be a long numeric string such as 633320000127123456 |
duration |
The planned duration of the maintenance window, in minutes. The window will automatically end after this period. |
| Output | Description |
|---|---|
maintenance-id |
The ID of the maintenance window instance that was created. This can be used to cancel the maintenance window if required. |
uses: richteambs/maintainizr-action/start
with:
app-url: ${{ secrets.MAINTZ_FUNC_URL }}
app-key: ${{ secrets.MAINTZ_FUNC_APP_KEY }}
monitor-id: '12345'
duration: 1 # 1 minuteUse this action to end a maintenance window.
If you don't call this action, the window will automatically end after the duration specified when
the window was started.
If you call this action when the window is already ended, it will not report an error. This means you can safely call it even if you have overrun the maintenance window, or if you have called it multiple times.
If you pass an invalid maintenance id, the action will report an error.
| Parameter | Description |
|---|---|
app-url |
See below. |
app-key |
See below. |
maintenance-id |
The ID of the maintenance window to terminate. This should be the value output by the start action. |
uses: richteambs/maintainizr-action/end
with:
app-url: '${{ secrets.MAINTZ_FUNC_URL }}'
app-key: ${{ secrets.MAINTZ_FUNC_APP_KEY }}
maintenance-id: ${{ needs.start_maintenance.outputs.maintenance-id }}The actions in this repo work by contacting the Maintainizr API, which in turn contacts the Site24x7 API (the Maintainizr API provides a simplified facade). You therefore need to provide some parameters that specify the connection details for the Maintainizr API. These parameters are common to all the actions in this repository.
| Parameter | Description |
|---|---|
app-url |
The root URL of the Maintainizr API. |
app-key |
A secret key that is required for security purposes. |
This article documents how to find out the values to use for these parameters.
Information on how you can contribute to this repo is here.
Developer documentation is here.