Nightly Cloud Regression #194
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Cloud Regression | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| nightly-live-tests: | |
| runs-on: ubuntu-latest | |
| environment: next | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| N8N_HOST: ${{ vars.N8N_HOST }} | |
| N8N_API_KEY: ${{ secrets.N8N_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 10 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Resolve n8n stable tag | |
| id: n8n-tag | |
| run: echo "tag=$(node scripts/ensure-n8n-cache.cjs --print-tag)" >> "$GITHUB_OUTPUT" | |
| - name: Check if n8n version changed | |
| id: n8n-update-check | |
| run: | | |
| LATEST_TAG="${{ steps.n8n-tag.outputs.tag }}" | |
| PACKAGE_VERSION=$(node -e "try { const j=require('./packages/skills/package.json'); process.stdout.write(j.n8nVersion ? 'n8n@' + j.n8nVersion : ''); } catch { process.stdout.write(''); }" 2>/dev/null) | |
| if [ "$PACKAGE_VERSION" = "$LATEST_TAG" ]; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| echo "ℹ️ n8n version unchanged ($LATEST_TAG) — knowledge base rebuild not needed." | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| N8N_SEMVER="${LATEST_TAG#n8n@}" | |
| echo "n8n_version=$N8N_SEMVER" >> "$GITHUB_OUTPUT" | |
| echo "🔄 n8n version changed: '$PACKAGE_VERSION' → '$LATEST_TAG'" | |
| fi | |
| - name: Cache n8n repository | |
| uses: actions/cache@v4 | |
| with: | |
| path: .n8n-cache | |
| key: ${{ runner.os }}-n8n-cache-${{ steps.n8n-tag.outputs.tag }}-${{ hashFiles('scripts/ensure-n8n-cache.cjs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-n8n-cache- | |
| - name: Build all packages | |
| run: npm run build | |
| - name: Run root test report | |
| if: env.N8N_HOST != '' && env.N8N_API_KEY != '' | |
| run: npm test | |
| - name: Create PR for n8n version update | |
| if: steps.n8n-update-check.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: nightly/n8n-version-update | |
| delete-branch: true | |
| commit-message: "fix(skills): update knowledge base for n8n@${{ steps.n8n-update-check.outputs.n8n_version }}" | |
| title: "fix(skills): update knowledge base for n8n@${{ steps.n8n-update-check.outputs.n8n_version }}" | |
| body: | | |
| Automated n8n version bump from the nightly cloud regression run. | |
| Merge to rebuild the skills knowledge base against the latest n8n release. | |
| base: main | |
| add-paths: packages/skills/package.json | |
| labels: automated, n8n-update |