|
84 | 84 | See https://github.com/bazel-contrib/publish-to-bcr/issues/261. |
85 | 85 | default: true |
86 | 86 | type: boolean |
| 87 | + author_name: |
| 88 | + description: | |
| 89 | + Commit author name for the BCR entry. Defaults to the actor running the GitHub Actions workflow. |
| 90 | + default: ${{ github.actor }} |
| 91 | + type: string |
| 92 | + author_email: |
| 93 | + description: | |
| 94 | + Commit author email for the BCR entry. Defaults to the actor running the GitHub Actions workflow. |
| 95 | + default: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com |
| 96 | + type: string |
| 97 | + # Default the committer to the GitHub Actions bot |
| 98 | + # https://github.com/orgs/community/discussions/26560#discussioncomment-3531273 |
| 99 | + committer_name: |
| 100 | + description: | |
| 101 | + Name of the git committer. Defaults to the GitHub Action bot's name. |
| 102 | + default: "github-actions[bot]" |
| 103 | + type: string |
| 104 | + committer_email: |
| 105 | + description: | |
| 106 | + Email of the git committer. Defaults to the GitHub Action bot's email. |
| 107 | + default: "41898282+github-actions[bot]@users.noreply.github.com" |
| 108 | + type: string |
87 | 109 | secrets: |
88 | 110 | publish_token: |
89 | 111 | required: true |
@@ -237,16 +259,13 @@ jobs: |
237 | 259 | env: |
238 | 260 | # Set the author to the actor of this workflow. Use the github-provided |
239 | 261 | # noreply email address: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address. |
240 | | - AUTHOR_NAME: ${{ github.actor }} |
241 | | - AUTHOR_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com |
| 262 | + AUTHOR_NAME: ${{ inputs.author_name }} |
| 263 | + AUTHOR_EMAIL: ${{ inputs.author_email }} |
| 264 | + COMMITTER_NAME: ${{ inputs.committer_name }} |
| 265 | + COMMITTER_EMAIL: ${{ inputs.committer_email }} |
242 | 266 | run: | |
243 | 267 | set -o errexit -o nounset -o pipefail |
244 | 268 |
|
245 | | - # Set committer to the GitHub Actions bot |
246 | | - # https://github.com/orgs/community/discussions/26560#discussioncomment-3531273 |
247 | | - COMMITTER_NAME="github-actions[bot]" |
248 | | - COMMITTER_EMAIL="41898282+github-actions[bot]@users.noreply.github.com" |
249 | | -
|
250 | 269 | # Use an authorized remote url to push to the fork |
251 | 270 | git remote add authed-fork https://x-access-token:${{ secrets.publish_token }}@github.com/${REGISTRY_FORK}.git |
252 | 271 |
|
|
0 commit comments