name: Update Static Dependencies on: pull_request: paths: - 'package.json' - 'package-lock.json' workflow_dispatch: permissions: contents: write jobs: update-deps: runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: '24' cache: 'npm' - name: Update static dependencies run: make update-static-deps - name: Check for changes id: git-check run: | git status --short pkg/service/soundtouchweb/static/lib/ if [ -n "$(git status --short pkg/service/soundtouchweb/static/lib/)" ]; then echo "changed=true" >> $GITHUB_OUTPUT else echo "changed=false" >> $GITHUB_OUTPUT fi - name: Commit and push changes if: steps.git-check.outputs.changed == 'true' run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add pkg/service/soundtouchweb/static/lib/ git commit -m "chore: sync static dependencies with package.json" git push