Skip to content

Update schema.json file #56

Update schema.json file

Update schema.json file #56

Workflow file for this run

name: Update schema.json file
on:
schedule:
- cron: '0 2 * * *'
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:
update-schema:
name: Update schema.json file
runs-on: ubuntu-latest
outputs:
changes_detected: ${{ steps.auto-commit-action.outputs.changes_detected }}
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_name != 'workflow_dispatch' || 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_name != 'workflow_dispatch' || 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
id: auto-commit-action
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"
deploy-to-gha:
needs: [ update-schema ]
if: needs.update-schema.outputs.changes_detected == 'true'
permissions:
contents: read
pages: write
id-token: write
uses: ./.github/workflows/schema_deploy.yml