Add specification Janitza B23 312 10J #135
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate and merge Pull request | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened] | |
| workflow_dispatch: | |
| inputs: | |
| pr_owner: | |
| type: string | |
| default: 'modbus2mqtt' | |
| description: Enter Pull Request owner | |
| pr_number: | |
| type: string | |
| default: '33' | |
| description: Enter Pull Request number | |
| permissions: write-all | |
| jobs: | |
| validate_and_release: | |
| runs-on: ubuntu-latest | |
| environment: validate | |
| steps: | |
| - name: Dump GitHub context | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| run: echo "$GITHUB_CONTEXT" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 20.x | |
| - run: echo '{} ' >package.json | |
| - run: npm install @modbus2mqtt/specification | |
| - name: set PR_NUMBER | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| run: echo PR_NUMBER=${{ inputs.pr_number }} >> $GITHUB_ENV | |
| - name: set PR_NUMBER from event | |
| if: ${{ github.event_name != 'workflow_dispatch' }} | |
| run: echo PR_NUMBER=${{ github.event.number }} >> $GITHUB_ENV | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'modbus2mqtt' | |
| - run: node node_modules/@modbus2mqtt/validator/dist/validate.js --pr_number ${{ env.PR_NUMBER }} --pr_owner ${{github.repository_owner}} | |
| id: validate_specs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - id: automerge | |
| if: ${{ steps.validate_specs.outputs.SPECS_ONLY != '' }} | |
| name: automerge | |
| uses: "pascalgn/automerge-action@v0.16.3" | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| PULL_REQUEST: ${{ env.PR_NUMBER }} | |
| MERGE_LABELS: "" |