mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commits adds an action to update the Angular CLI help contents that are used by AIO to generate CLI guides. This also changes the setup to include the files are source files instead of having to clone the repository each time. This also simplifies the PR review process of the PR opened by the action. PR Close #48577
40 lines
1.3 KiB
YAML
40 lines
1.3 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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
|
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
|
|
- name: Generate CLI help
|
|
run: node aio/scripts/update-cli-help/index.mjs
|
|
- name: Create a PR (if necessary)
|
|
uses: angular/dev-infra/github-actions/create-pr-for-changes@ad1374e8222825244b36a91d0f085f8fc3c7126d
|
|
with:
|
|
branch-prefix: update-cli-help
|
|
pr-title: 'docs: update Angular CLI help'
|
|
pr-description: |
|
|
Updated Angular CLI help contents.
|
|
pr-labels: |
|
|
action: review
|
|
area: docs
|
|
angular-robot-token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
|