Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set Node.js 16.x
uses: actions/setup-node@v3.5.0
uses: actions/setup-node@v4
with:
node-version: 16.x

Expand All @@ -44,7 +44,7 @@ jobs:
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: npm ci
- run: npm test

# test action works running from the graph
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - uses: ./
# with:
# milliseconds: 1000
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
name: Send Telemetry
steps:
- name: Send execution details to the Cronitor for Github Actions agent
uses: cronitorio/monitor-github-actions@v7
uses: cronitorio/monitor-github-actions@v8
with:
event: ${{ toJSON(github.event) }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -43,11 +43,10 @@ jobs:
|---------------------|----------|----------------------------------------------------|
| ``event`` | Yes | Triggering event (passed from ``github.event``) |
| ``cronitor_key`` | Yes | Your Cronitor API key |
| ``github_token`` | No | To relay workflow logs, pass your ``GITHUB_TOKEN`` |
| ``github_token`` | No | Used to fetch workflow schedules from your repo |
| ``cronitor_group`` | No | Add monitors to a Cronitor group |
| ``cronitor_notify`` | No | A notification list to use for alerts |

Note: Log relay is coming soon.
| ``key_format`` | No | Monitor key format: ``slugified`` (default) or ``guid`` |

## Monitoring Specific Workflows
By default, when you add the YAML for the Cronitor Monitoring Relay as an Action, it will be invoked automatically for every
Expand All @@ -73,5 +72,12 @@ After adding the Cronitor Relay yaml, your workflows will appear on your Cronito
dashboard, you will be able to customize alert preferences, including:
- Be alerted only if a workflow persistently fails
- Be alerted if a workflow does not run or complete at least once in a given time span.
- Be alerted on workflow execution time and avoid surprise charges from Github.
- Be alerted on workflow execution time and avoid surprise charges from Github.

## Changelog

### v8
- **Schedule sync**: Workflows with a `schedule` trigger now automatically sync their cron schedule to Cronitor.
- **Cleaner monitor keys**: Monitor keys now use a slugified workflow name format (`gh-my-workflow-name`) instead of numeric IDs.
- **Backwards compatibility**: Existing users can set `key_format: guid` to keep using the old key format and preserve their existing monitors.

4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
cronitor_notify:
description: Optionally specify a notification list or channel for alerts from this monitor
required: false
key_format:
description: 'Monitor key format: "slugified" (default, gh-workflow-name) or "guid" (repo-id-workflow-id)'
required: false
default: 'slugified'
branding:
icon: 'activity'
color: 'white'
Expand Down
Loading