{"id":36825963,"url":"https://github.com/gridatek/ng-update-action","last_synced_at":"2026-01-12T14:04:49.753Z","repository":{"id":317047629,"uuid":"1065785103","full_name":"gridatek/ng-update-action","owner":"gridatek","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-28T13:46:12.000Z","size":918,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T14:43:57.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gridatek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-28T12:28:29.000Z","updated_at":"2025-09-28T12:45:27.000Z","dependencies_parsed_at":"2025-09-28T14:44:02.064Z","dependency_job_id":null,"html_url":"https://github.com/gridatek/ng-update-action","commit_stats":null,"previous_names":["gridatek/ng-update-action"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gridatek/ng-update-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridatek%2Fng-update-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridatek%2Fng-update-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridatek%2Fng-update-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridatek%2Fng-update-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gridatek","download_url":"https://codeload.github.com/gridatek/ng-update-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gridatek%2Fng-update-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T14:04:45.779Z","updated_at":"2026-01-12T14:04:49.734Z","avatar_url":"https://github.com/gridatek.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular CLI Update Action\n\n[![CI](https://github.com/gridatek/ng-update-action/actions/workflows/ci.yml/badge.svg)](https://github.com/gridatek/ng-update-action/actions/workflows/ci.yml)\n[![GitHub release](https://img.shields.io/github/release/gridatek/ng-update-action.svg)](https://github.com/gridatek/ng-update-action/releases)\n\nAutomatically update Angular CLI workspaces to the latest version with validation and smart PR creation. This GitHub Action runs `ng update` commands, validates the changes, and can either auto-merge successful updates or create pull requests for review.\n\n## Features\n\n- 🚀 **Automatic Angular CLI Updates** - Updates `@angular/core`, `@angular/cli`, and additional packages\n- 📦 **Multi-Package Manager Support** - Works with npm, yarn, and pnpm\n- ✅ **Built-in Validation** - Runs build, test, lint, and custom validation commands\n- 🔀 **Smart PR Management** - Auto-merge successful updates or create PRs for review\n- 🏷️ **Flexible Version Targeting** - Support for `latest`, `next`, `rc`, or specific versions\n- 🌳 **Branch Protection Aware** - Respects repository branch protection rules\n- 🧪 **Dev Mode** - Special testing mode with unique branch naming\n\n## Quick Start\n\nAdd this workflow to your repository at `.github/workflows/ng-update.yml`:\n\n```yaml\nname: Angular Update\n\non:\n  schedule:\n    - cron: '0 2 * * 1' # Run every Monday at 2 AM\n  workflow_dispatch: # Allow manual trigger\n\njobs:\n  update:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - uses: actions/setup-node@v4\n        with:\n          node-version: '20'\n\n      - uses: gridatek/ng-update-action@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          package-manager: npm\n          validation-commands: 'build,test'\n          merge-strategy: auto-merge\n```\n\n## Configuration Options\n\n### Inputs\n\n| Input                   | Description                                                    | Default            | Required |\n| ----------------------- | -------------------------------------------------------------- | ------------------ | -------- |\n| `angular-package`       | The Angular package to check for updates                       | `@angular/core`    | No       |\n| `angular-version`       | Angular version to use (latest, next, rc, or specific version) | `latest`           | No       |\n| `additional-packages`   | Additional Angular packages to update (comma-separated)        | `@angular/cli`     | No       |\n| `package-manager`       | Package manager to use (npm, yarn, pnpm)                       | `npm`              | No       |\n| `validation-commands`   | Commands to run for validation (comma-separated)               | `build`            | No       |\n| `affected`              | Only validate affected projects (true) or all projects (false) | `true`             | No       |\n| `merge-strategy`        | Merge strategy after validation (auto-merge, always-pr)        | `auto-merge`       | No       |\n| `pr-labels`             | Labels to add to PRs (comma-separated)                         | `ng-update-action` | No       |\n| `commit-message-prefix` | Prefix for commit messages                                     | `build`            | No       |\n| `target-branch`         | Target branch for merging changes                              | `main`             | No       |\n| `working-directory`     | Working directory                                              | `.`                | No       |\n| `skip-initial-install`  | Skip initial dependency installation                           | `false`            | No       |\n| `dev-mode`              | Enable dev mode for testing                                    | `false`            | No       |\n\n### Outputs\n\n| Output              | Description                           |\n| ------------------- | ------------------------------------- |\n| `updated`           | Whether Angular was updated           |\n| `current-version`   | Current Angular version before update |\n| `latest-version`    | Latest Angular version                |\n| `validation-result` | Result of validation tests            |\n| `pr-url`            | URL of created PR (if any)            |\n\n## Usage Examples\n\n### Basic Usage with Auto-merge\n\n```yaml\n- uses: gridatek/ng-update-action@v1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    package-manager: npm\n    validation-commands: 'build'\n    merge-strategy: auto-merge\n```\n\n### Always Create PR for Review\n\n```yaml\n- uses: gridatek/ng-update-action@v1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    package-manager: yarn\n    validation-commands: 'build,test,lint'\n    merge-strategy: always-pr\n    pr-labels: 'dependencies,angular-update'\n```\n\n### Update to Specific Version\n\n```yaml\n- uses: gridatek/ng-update-action@v1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    angular-version: '17.3.0'\n    additional-packages: '@angular/cli,@angular/material'\n    validation-commands: 'build,test'\n```\n\n### Update to Next/RC Version\n\n```yaml\n- uses: gridatek/ng-update-action@v1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    angular-version: 'next'\n    validation-commands: 'build'\n    merge-strategy: always-pr\n```\n\n### Custom Validation Commands\n\n```yaml\n- uses: gridatek/ng-update-action@v1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    validation-commands: 'build,test,lint,npm run e2e'\n    working-directory: './frontend'\n```\n\n### Matrix Testing (Dev Mode)\n\n```yaml\nstrategy:\n  matrix:\n    package-manager: [npm, yarn, pnpm]\n    node-version: [18, 20, 22]\n\nsteps:\n  - uses: gridatek/ng-update-action@v1\n    env:\n      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n    with:\n      package-manager: ${{ matrix.package-manager }}\n      dev-mode: true\n      validation-commands: 'build,test'\n```\n\n## How It Works\n\n```mermaid\nflowchart TD\n    A[Start] --\u003e B[Detect Package Manager]\n    B --\u003e C[Install Dependencies]\n    C --\u003e D[Check Angular Versions]\n    D --\u003e E{Update Needed?}\n    E --\u003e|No| F[Exit - No Changes]\n    E --\u003e|Yes| G[Create Update Branch]\n    G --\u003e H[Run ng update]\n    H --\u003e I[Install Dependencies]\n    I --\u003e J[Commit Changes]\n    J --\u003e K[Run Validation]\n    K --\u003e L{Validation Passed?}\n    L --\u003e|No| M[Create PR for Review]\n    L --\u003e|Yes| N{Auto-merge Enabled?}\n    N --\u003e|No| M\n    N --\u003e|Yes| O[Try Auto-merge]\n    O --\u003e P{Merge Successful?}\n    P --\u003e|No| M\n    P --\u003e|Yes| Q[Delete Branch]\n    M --\u003e R[Add Labels \u0026 Create PR]\n    Q --\u003e S[End]\n    R --\u003e S\n```\n\n## Validation Commands\n\nThe action supports several built-in validation commands:\n\n- **`build`** - Runs `ng build --configuration production`\n- **`test`** - Runs `ng test --watch=false --browsers=ChromeHeadless --code-coverage`\n- **`lint`** - Runs `ng lint`\n- **`e2e`** - Runs `ng e2e`\n- **Custom commands** - Any command can be specified and will be executed as-is\n\n## Package Manager Support\n\nThe action automatically detects your package manager based on lock files:\n\n- **npm** - Uses `package-lock.json`\n- **yarn** - Uses `yarn.lock`\n- **pnpm** - Uses `pnpm-lock.yaml`\n\nYou can also explicitly specify the package manager using the `package-manager` input.\n\n## Branch Naming\n\n- **Production mode**: `ng-update-{version}` (e.g., `ng-update-17.3.0`)\n- **Dev mode**: `ng-update-{version}-{pkg-manager}-node{version}-{run-id}-{job-id}`\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Action fails with permission errors**\n   - Ensure `GITHUB_TOKEN` has write permissions to the repository\n   - Check that branch protection rules allow the action to create/merge branches\n\n2. **ng update fails with dependency conflicts**\n   - The action uses `--force` flag to handle most conflicts\n   - Consider updating packages individually by specifying them separately\n\n3. **Validation fails unexpectedly**\n   - Check the validation command outputs in the action logs\n   - Ensure your project builds successfully before running the action\n\n4. **Auto-merge doesn't work**\n   - Verify branch protection settings allow auto-merge\n   - Check that required status checks are configured correctly\n\n### Angular CLI Version Compatibility\n\nDifferent Angular versions require specific Node.js versions:\n\n| Angular Version | Node.js Version  |\n| --------------- | ---------------- |\n| 15.x            | 16.x, 18.x       |\n| 16.x            | 16.x, 18.x       |\n| 17.x            | 18.x, 20.x       |\n| 18.x            | 18.x, 20.x, 22.x |\n\nMake sure your workflow uses a compatible Node.js version.\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nThis action is inspired by and follows patterns from [nx-migrate-action](https://github.com/gridatek/nx-migrate-action).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgridatek%2Fng-update-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgridatek%2Fng-update-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgridatek%2Fng-update-action/lists"}