Skip to content
Open

Ci #4

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
41 changes: 41 additions & 0 deletions .github/workflows/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: JSON Schema

on:
push:
branches:
- main
paths:
- "**/*.go"
- ".github/workflows/schema.yaml"

env:
GO_VERSION: 1.18

jobs:
schema:
name: JSON Schema
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v3
with:
token: ${{ secrets.MEGAEASE_BOT }}

- name: Setup Go Environment
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- name: Build EaseProbe
run: make

- name: Generate JSON Schema
run: ./build/bin/easeprobe -j > resources/schema.json

- name: Commit JSON Schema
uses: EndBug/add-and-commit@v7
with:
message: "Update JSON Schema"
add: "resources/schema.json"
author_name: "GitHub Actions"
author_email: "actions@github.com"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/
.vscode/
build/*
*.yaml
*.yaml
!.github/workflows/*.yaml