Skip to content
Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,29 @@ on:
See https://github.com/bazel-contrib/publish-to-bcr/issues/261.
default: true
type: boolean
author_name:
description: |
Commit author name for the BCR entry. Defaults to the actor running the GitHub Actions workflow.
default: ${{ github.actor }}
type: string
author_email:
description: |
Commit author email for the BCR entry. Defaults to the actor running the GitHub Actions workflow.
default: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
type: string
# Set committer to the GitHub Actions bot.
# If none provided, the GitHub Actions Bot identity is used.
# https://github.com/orgs/community/discussions/26560#discussioncomment-3531273
committer_name:
description: |
Name of the git committer. Defaults to the GitHub Action bot's name.
default: "github-actions[bot]"
type: string
committer_email:
description: |
Email of the git committer. Defaults to the GitHub Action bot's email.
default: "41898282+github-actions[bot]@users.noreply.github.com"
type: string
secrets:
publish_token:
required: true
Expand Down Expand Up @@ -237,16 +260,13 @@ jobs:
env:
# Set the author to the actor of this workflow. Use the github-provided
# 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.
AUTHOR_NAME: ${{ github.actor }}
AUTHOR_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
AUTHOR_NAME: ${{ inputs.author_name }}
AUTHOR_EMAIL: ${{ inputs.author_email }}
COMMITTER_NAME: ${{ inputs.committer_name }}
COMMITTER_EMAIL: ${{ inputs.committer_email }}
run: |
set -o errexit -o nounset -o pipefail

# Set committer to the GitHub Actions bot
# https://github.com/orgs/community/discussions/26560#discussioncomment-3531273
COMMITTER_NAME="github-actions[bot]"
COMMITTER_EMAIL="41898282+github-actions[bot]@users.noreply.github.com"

# Use an authorized remote url to push to the fork
git remote add authed-fork https://x-access-token:${{ secrets.publish_token }}@github.com/${REGISTRY_FORK}.git

Expand Down
Loading