name: Update zigbee-frontend on: repository_dispatch: types: update_frontend permissions: {} jobs: update_frontend: permissions: contents: write # to create branch (peter-evans/create-pull-request) pull-requests: write # to create a PR (peter-evans/create-pull-request) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: ref: dev ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - uses: actions/setup-node@v3 with: node-version: 18 - run: npm install zigbee2mqtt-frontend@${{ github.event.client_payload.version }} --save-exact - uses: peter-evans/create-pull-request@v4 id: cpr with: commit-message: Update zigbee2mqtt-frontend to ${{ github.event.client_payload.version }} branch: "update_frontend" title: Update zigbee-frontend to ${{ github.event.client_payload.version }} - run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail - uses: peter-evans/enable-pull-request-automerge@v2 if: steps.cpr.outputs.pull-request-operation == 'created' with: token: ${{ secrets.CR_PAT }} pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} merge-method: squash