name: Update Node Popularity Data on: schedule: # Run every Monday at 00:00 UTC - cron: '0 0 * * 1' workflow_dispatch: # Allow manual trigger for testing permissions: contents: write pull-requests: write jobs: update-popularity: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Node.js and Dependencies uses: ./.github/actions/setup-nodejs with: build-command: '' # Skip build, we only need to fetch data - name: Fetch node popularity data run: | cd packages/frontend/editor-ui node scripts/fetch-node-popularity.mjs env: N8N_FAIL_ON_POPULARITY_FETCH_ERROR: 'false' # Don't fail if API is down - name: Check for changes id: check-changes run: | if git diff --quiet packages/frontend/editor-ui/data/node-popularity.json; then echo "No changes to popularity data" echo "has_changes=false" >> "$GITHUB_OUTPUT" else echo "Popularity data has changed" echo "has_changes=true" >> "$GITHUB_OUTPUT" fi - name: Create Pull Request if: steps.check-changes.outputs.has_changes == 'true' uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: branch-token: ${{ secrets.GITHUB_TOKEN }} commit-message: 'chore: Update node popularity data' title: 'chore: Update node popularity data' body: | This automated PR updates the node popularity data used for sorting nodes in the node creator panel. The data is fetched weekly from the n8n telemetry endpoint to reflect current usage patterns. _Generated by the weekly node popularity update workflow._ branch: update-node-popularity base: master delete-branch: true author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>