feat(ping): #1260 deprecate ping request (#1288) #29
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 worklofw will trigger on a push to main when the file "monika-config-schema.json" is updated | |
# 1. Checkout the schemastore fork | |
# 2. Refresh it from upstream | |
# 3. Create a PR for the json update | |
name: Auto PR to Schemastore/schemastore.git | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'src/monika-config-schema.json' # only run the workflow if the schema file is changed | |
branches: | |
- main | |
env: | |
USERNAME: ${{ github.actor }} | |
EMAIL: ${{ github.actor}}@users.noreply.github.com | |
permissions: | |
issues: read | |
pull-requests: read | |
jobs: | |
create-auto-PR: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: SchemaStore/schemastore | |
token: ${{ secrets.AUTO_PR_TOKEN }} | |
ref: master | |
- name: Update schema file | |
run: | | |
cd src/schemas/json | |
rm monika-config-schema.json | |
wget https://raw.githubusercontent.com/hyperjumptech/monika/main/src/monika-config-schema.json | |
git config --global user.name "$USERNAME" | |
git config --global user.email "$EMAIL" | |
git add . | |
git commit -m "update json schema" | |
- name: ✍🏻 Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Run Test on Schema | |
run: | | |
cd src | |
npm ci | |
npm run build | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.AUTO_PR_TOKEN }} | |
commit-message: Update monika-config-schema | |
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
base: master | |
push-to-fork: hyperjumptech/schemastore | |
branch: feat/Update-monika-schema | |
title: '[PR] Update monika config schema' | |
body: | | |
In this PR: | |
- Update config json schema to improve suggestions | |
- Update keys, default values and properties. | |
draft: false | |
delete-branch: true | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
env: | |
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }} | |
PR_URL: ${{ steps.cpr.outputs.pull-request-url }} | |
run: | | |
echo "Pull Request Number - $PR_NUMBER" | |
echo "Pull Request URL - $PR_URL" |