From 16e9fd5251189c3d389adb836f243575c134d680 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 31 Oct 2025 09:43:48 -0500 Subject: [PATCH] feat: use autofix.ci to auto-update dist/ on all PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switches from manual commit workflow to autofix.ci for automatically updating the dist/ folder when source files change. This has several advantages: 1. Works on ALL PRs, not just Renovate PRs 2. Commits made by autofix.ci (GitHub App) trigger CI workflows, unlike commits made with GITHUB_TOKEN which don't trigger workflows 3. Renovate recognizes autofix.ci commits via gitIgnoredAuthors and can still auto-rebase PRs Changes: - Renamed workflow from renovate-dist-update to auto-update-dist - Removed Renovate-only condition - now runs on all PRs - Replaced manual git commit/push with autofix.ci action - Updated renovate.json to ignore autofix.ci commits - Changed permissions from write to read-only Note: Requires installing the autofix.ci GitHub App: https://github.com/apps/autofix-ci 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/renovate.json | 2 +- .github/workflows/auto-update-dist.yml | 35 +++++++++++++++ .github/workflows/renovate-dist-update.yml | 52 ---------------------- 3 files changed, 36 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/auto-update-dist.yml delete mode 100644 .github/workflows/renovate-dist-update.yml diff --git a/.github/renovate.json b/.github/renovate.json index d5eec44..b26089f 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["github>jdx/renovate-config"], - "gitIgnoredAuthors": ["github-actions[bot]@users.noreply.github.com"], + "gitIgnoredAuthors": ["autofix.ci[bot] "], "rebaseWhen": "conflicted" } diff --git a/.github/workflows/auto-update-dist.yml b/.github/workflows/auto-update-dist.yml new file mode 100644 index 0000000..1e9085b --- /dev/null +++ b/.github/workflows/auto-update-dist.yml @@ -0,0 +1,35 @@ +name: Auto-update Distribution + +on: + pull_request: + paths: + - 'package.json' + - 'package-lock.json' + - 'src/**' + - 'tsconfig.json' + +permissions: + contents: read + +jobs: + update-dist: + runs-on: ubuntu-latest + + steps: + - name: Checkout PR branch + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build and package + run: npm run all + + - name: autofix.ci + uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c diff --git a/.github/workflows/renovate-dist-update.yml b/.github/workflows/renovate-dist-update.yml deleted file mode 100644 index 11cf021..0000000 --- a/.github/workflows/renovate-dist-update.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Update Distribution on Renovate PRs - -on: - pull_request: - paths: - - 'package.json' - - 'package-lock.json' - - 'src/**' - - 'tsconfig.json' - -permissions: - contents: write - pull-requests: write - -jobs: - update-dist: - # Only run for Renovate PRs - if: github.actor == 'renovate[bot]' || github.actor == 'renovate-bot' - runs-on: ubuntu-latest - - steps: - - name: Checkout PR branch - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '24' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build and package - run: npm run all - - - name: Check for changes - id: git-check - run: | - git diff --exit-code dist/ || echo "changed=true" >> $GITHUB_OUTPUT - - - name: Commit and push changes - if: steps.git-check.outputs.changed == 'true' - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add dist/ - git commit -m "chore: rebuild distribution" - git push