name: Yarn Lock Changes
on:
  workflow_dispatch:
  pull_request:
    paths:
      - yarn.lock
#  push:
#    paths:
#      - yarn.lock

jobs:
  yarn_lock_changes:
    runs-on: ubuntu-latest
    # Permission overwrite is required for Dependabot PRs, see "Common issues" below.
    permissions:
      pull-requests: write
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
        fetch-depth: 2
        token: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Yarn Lock Changes
        # Please use `main` as version before the stable release will be published as `v1`.
        uses: Simek/yarn-lock-changes@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          # Optional inputs, can be deleted safely if you are happy with default values.
          collapsibleThreshold: 25
          failOnDowngrade: false
          path: yarn.lock
          updateComment: true
