mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 11:35:41 +00:00
feat(backend): improve tag docs (#8960)
* add admindocs * add tag export command * add filter export * switch to yaml * upload meta info to artifacts * format workflow file * fix creation command * keep all artifacts in schema repo * fix namespace * use one command for export * include tags and filters in docs * change default filename * fix call * fix itteration syntax * clean up rendering * fix formatting * simple escape
This commit is contained in:
37
.github/workflows/qc_checks.yaml
vendored
37
.github/workflows/qc_checks.yaml
vendored
@ -170,9 +170,9 @@ jobs:
|
||||
id: breaking_changes
|
||||
uses: oasdiff/oasdiff-action/diff@1c611ffb1253a72924624aa4fb662e302b3565d3 # pin@main
|
||||
with:
|
||||
base: 'api.yaml'
|
||||
revision: 'src/backend/InvenTree/schema.yml'
|
||||
format: 'html'
|
||||
base: "api.yaml"
|
||||
revision: "src/backend/InvenTree/schema.yml"
|
||||
format: "html"
|
||||
- name: Echoing diff to step
|
||||
env:
|
||||
DIFF: ${{ steps.breaking_changes.outputs.diff }}
|
||||
@ -194,6 +194,23 @@ jobs:
|
||||
version="$(python3 .github/scripts/version_check.py only_version 2>&1)"
|
||||
echo "Version: $version"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
- name: Extract settings / tags
|
||||
run: invoke int.export-definitions
|
||||
- name: Upload settings
|
||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # pin@v4.6.0
|
||||
with:
|
||||
name: inventree_settings.json
|
||||
path: src/backend/InvenTree/inventree_settings.json
|
||||
- name: Upload tags
|
||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # pin@v4.6.0
|
||||
with:
|
||||
name: inventree_tags.yml
|
||||
path: src/backend/InvenTree/inventree_tags.yml
|
||||
- name: Upload filters
|
||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # pin@v4.6.0
|
||||
with:
|
||||
name: inventree_filters.yml
|
||||
path: src/backend/InvenTree/inventree_filters.yml
|
||||
|
||||
schema-push:
|
||||
name: Push new schema
|
||||
@ -210,15 +227,20 @@ jobs:
|
||||
repository: inventree/schema
|
||||
token: ${{ secrets.SCHEMA_PAT }}
|
||||
persist-credentials: true
|
||||
- name: Create artifact directory
|
||||
run: mkdir -p artifact
|
||||
- name: Download schema artifact
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4.1.8
|
||||
with:
|
||||
name: schema.yml
|
||||
- name: Move schema to correct location
|
||||
path: artifact
|
||||
- name: Move files to correct location
|
||||
run: |
|
||||
echo "Version: $version"
|
||||
mkdir export/${version}
|
||||
mv schema.yml export/${version}/api.yaml
|
||||
mv artifact/schema.yml export/${version}/api.yaml
|
||||
mv artifact/inventree_settings.json export/${version}/inventree_settings.json
|
||||
mv artifact/inventree_tags.yml export/${version}/inventree_tags.yml
|
||||
mv artifact/inventree_filters.yml export/${version}/inventree_filters.yml
|
||||
- uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # pin@v5.1.0
|
||||
name: Commit schema changes
|
||||
with:
|
||||
@ -518,7 +540,6 @@ jobs:
|
||||
chmod +rw /home/runner/work/InvenTree/db.sqlite3
|
||||
invoke migrate
|
||||
|
||||
|
||||
platform_ui:
|
||||
name: Tests - Platform UI
|
||||
runs-on: ubuntu-20.04
|
||||
@ -609,7 +630,7 @@ jobs:
|
||||
zizmor:
|
||||
name: Security [Zizmor]
|
||||
runs-on: ubuntu-20.04
|
||||
needs: ['pre-commit', 'paths-filter']
|
||||
needs: ["pre-commit", "paths-filter"]
|
||||
if: needs.paths-filter.outputs.cicd == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||
|
||||
permissions:
|
||||
|
Reference in New Issue
Block a user