name: push on: push: branches-ignore: - 'main' pull_request_target: branches-ignore: - 'main' jobs: format: runs-on: ubuntu-latest outputs: formatted: ${{ steps.has-changes.outputs.changes }} steps: - uses: RouxAntoine/checkout@v3.5.4 with: token: ${{ secrets.BOT_TOKEN }} # fetch-depth: '1' - uses: actions/setup-node@v3 with: node-version: '20.9.0' #- run: git checkout -b ${{ github.head_ref }} #- run: git pull origin ${{ github.head_ref }} - uses: sigyl-actions/xml-format@v0.0.2 with: folder: '.' regex: ^.+\.(([aA][xX][mM][lL]))$ - uses: sigyl-actions/ftbatch-strip-dates@v0.0.1 with: folder: './recipes' regex: ^.+\.(([oO][xX][mM][lL])|([uU][xX][mM][lL])|([pP][xX][mM][lL]))$ - uses: sigyl-actions/xml-format@v0.0.2 with: folder: './recipes' regex: ^.+\.(([oO][xX][mM][lL])|([uU][xX][mM][lL])|([pP][xX][mM][lL]))$ - uses: sigyl-actions/check-for-changes@v1.0.1 id: has-changes - uses: sigyl-actions/git-prep@v1.0.0 if: steps.has-changes.outputs.changes == 'true' - run: git status - name: commit if changed if: steps.has-changes.outputs.changes == 'true' run: | git add -A git commit -a -m "formatted" git push origin HEAD exit 1 document: needs: format if: needs.format.outputs.formatted != 'true' runs-on: ubuntu-latest outputs: formatted: ${{ steps.has-changes.outputs.changes }} steps: - uses: RouxAntoine/checkout@v3.5.4 with: token: ${{ secrets.BOT_TOKEN }} # fetch-depth: '1' - id: get_head_commit_title run: - echo "title=$(git log --format=%B -n 1 HEAD | head -n 1)" >> $GITHUB_OUTPUT - cat $GITHUB_OUTPUT run: echo ${{ steps.get-commit-title.outputs.text }} - uses: actions/setup-node@v3 with: node-version: '20.9.0' #- run: git checkout -b ${{ github.head_ref }} #- run: git pull origin ${{ github.head_ref }} - run: rm -rf document - run: mkdir document - uses: https://sigyl.com:3001/actions/ft-view-screen-document@main name: document ft-view with: display-exclude-file: BatchImport_zone10_hmi_restored.xml global-exclude-file: BatchImport_Global_zone10_hmi_restored.xml display-folder: displays global-folder: global objects folder: ft-view-screens - uses: https://sigyl.com:3001/actions/document-phases@main name: document batch with: document: document model: equipment-model.axml opc: equipment-model.json recipes: recipes - uses: sigyl-actions/check-for-changes@v1.0.1 id: has-changes - uses: sigyl-actions/git-prep@v1.0.0 if: steps.has-changes.outputs.changes == 'true' - run: git status - name: commit if changed if: steps.has-changes.outputs.changes == 'true' run: | git add -A git commit -a -m "documented ${{ steps.get-commit-title.outputs.text }}" git push origin HEAD exit 1 schema: runs-on: ubuntu-latest needs: document if: needs.document.outputs.formatted != 'true' outputs: result: ${{ steps.schema.outputs.result }} error: ${{ steps.schema.outputs.error }} schema: ./.github/schemas/AreaModel.xsd steps: - uses: RouxAntoine/checkout@v3.5.4 with: token: ${{ secrets.BOT_TOKEN }} fetch-depth: '1' - uses: actions/setup-node@v3 with: node-version: '20' - id: pwd run: | echo -n pwd= >> $GITHUB_OUTPUT pwd >> $GITHUB_OUTPUT - uses: sigyl-actions/xml-schema@v0.0.1 id: schema # continue-on-error: true with: schema_path: ${{ steps.pwd.outputs.pwd}} folder: '.' regex: ^.+\.(([aA][xX][mM][lL]))$ xsd: ./.github/schemas/AreaModel.xsd # master recipes isn't a valid schema! #- uses: sigyl-actions/xml-schema@main # with: # schema_path: ${{ steps.pwd.outputs.pwd}} # folder: './recipes' # regex: ^.+\.(([oO][xX][mM][lL])|([uU][xX][mM][lL])|([pP][xX][mM][lL]))$ # xsd: ./.github/schemas/MasterRecipe.xsd