|
48 | 48 | cd cli/temporalcli/internal/cmd/gen-docs |
49 | 49 | go run . |
50 | 50 |
|
51 | | - - name: Publish generated docs to cli repo |
52 | | - env: |
53 | | - GH_TOKEN: ${{ steps.generate_token.outputs.token }} |
54 | | - run: | |
55 | | - set -e |
56 | | - set -x |
57 | | - |
58 | | - if [ -z "$GH_TOKEN" ]; then |
59 | | - echo "GH_TOKEN is NOT set" |
60 | | - exit 1 |
61 | | - else |
62 | | - echo "GH_TOKEN is set" |
63 | | - fi |
64 | | - |
65 | | - |
66 | | - curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" https://api.github.com/user |
67 | | - |
68 | | - BRANCH_NAME="cli-update-docs-${{ github.ref_name }}" |
69 | | - # Remove the "/merge" suffix if it exists |
70 | | - BRANCH_NAME=${BRANCH_NAME%/merge} |
71 | | - |
72 | | - cd cli |
73 | | - |
74 | | - # Setup the committers identity. |
75 | | - git config --global user.email "sdk@temporal.io" |
76 | | - git config --global user.name "Temporal CLI" |
77 | | - |
78 | | - git checkout -b $BRANCH_NAME |
79 | | - git add . |
80 | | - # TODO: mention CLI release version |
81 | | - git commit -m "CLI docs update, autogenerated on CLI release $LATEST_TAG, ${{ github.ref_name }}" |
82 | | - git push origin "$BRANCH_NAME" |
83 | | - |
84 | | - gh pr create \ |
85 | | - --body "Autogenerated PR from https://github.com/temporalio/cli" \ |
86 | | - --title "CLI docs update $LATEST_TAG" \ |
87 | | - --head "$BRANCH_NAME" \ |
88 | | - --base "main" |
89 | | -
|
90 | 51 | - name: Publish generated docs to documentation repo |
91 | 52 | env: |
92 | 53 | GH_TOKEN: ${{ steps.generate_token.outputs.token }} |
|
101 | 62 | echo "GH_TOKEN is set" |
102 | 63 | fi |
103 | 64 | |
104 | | - curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" https://api.github.com/user |
105 | | - |
106 | 65 | BRANCH_NAME="cli-update-docs-${{ github.ref_name }}" |
107 | 66 | # Remove the "/merge" suffix if it exists |
108 | 67 | BRANCH_NAME=${BRANCH_NAME%/merge} |
|
117 | 76 | cp ../cli/temporalcli/docs/*.mdx docs/cli/ |
118 | 77 | git add . |
119 | 78 | # TODO: mention CLI release version |
120 | | - git commit -m "CLI docs update, autogenerated on CLI release $LATEST_TAG, ${{ github.ref_name }}" |
| 79 | + git commit -m "CLI docs update, autogenerated on CLI release $LATEST_TAG, ${{ github.ref_name }}" --author ${{ github.actor }} |
121 | 80 | git push origin "$BRANCH_NAME" |
122 | 81 | |
123 | 82 | gh pr create \ |
|
0 commit comments