Skip to content

Commit

Permalink
Add update_schema action
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Jul 28, 2024
1 parent 18f89b9 commit 02a0433
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/update_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy schema to Pages

on:
workflow_dispatch:
inputs:
branch:
type: choice
description: 'Branch to deploy'
required: true
default: 'develop'
options:
- 'develop'
- 'stable'

permissions:
contents: write

concurrency:
group: "update schema"
cancel-in-progress: false


jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'config_schema'

- name: Checkout freqtrade repo
uses: actions/checkout@v4
with:
repository: freqtrade/freqtrade
path: 'freqtrade'
ref: "${{ github.event.inputs.branch }}"


- name: Copy schema.json file from freqtrade repo to config_schema
if : ${{ github.event.inputs.branch == 'stable' }}
run: |
cp freqtrade/build_helpers/schema.json config_schema/schema/schema.json
- name: Copy schema.json file from freqtrade repo to config_schema
if : ${{ github.event.inputs.branch == 'develop' }}
run: |
cp freqtrade/build_helpers/schema.json config_schema/schema/schema_dev.json
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update schema.json file ${{ github.event.inputs.branch }}"
commit_user_name: Freqtrade Bot <[email protected]>
commit_user_email: [email protected]
file_pattern: 'schema/.*json'
repository: "config_schema"

0 comments on commit 02a0433

Please sign in to comment.