mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
name: Update AIO Angular CLI help
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs: {}
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- '[0-9]+.[0-9]+.x'
|
|
|
|
# Declare default permissions as read only.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
update_cli_help:
|
|
name: Update Angular CLI help (if necessary)
|
|
if: github.repository == 'angular/angular'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
with:
|
|
# Setting `persist-credentials: false` prevents the github-action account from being the
|
|
# account that is attempted to be used for authentication, instead the remote is set to
|
|
# an authenticated URL.
|
|
persist-credentials: false
|
|
# This is needed as otherwise the PR creation will fail with `shallow update not allowed` when the forked branch is not in sync.
|
|
fetch-depth: 0
|
|
- name: Generate CLI help
|
|
run: node adev/scripts/update-cli-help/index.mjs
|
|
env:
|
|
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
|
|
- name: Create a PR (if necessary)
|
|
uses: angular/dev-infra/github-actions/create-pr-for-changes@e6e98d32d7d4d350ecf4ec10ad9c7e75198daabd
|
|
with:
|
|
branch-prefix: update-cli-help
|
|
pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]'
|
|
pr-description: |
|
|
Updated Angular CLI help contents.
|
|
pr-labels: |
|
|
action: review
|
|
area: docs
|
|
angular-robot-token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
|