git-publish-subdir-action icon indicating copy to clipboard operation
git-publish-subdir-action copied to clipboard

Add author environment variables

Open promise opened this issue 3 years ago • 0 comments

Context

This PR has the same changes as https://github.com/s0/git-publish-subdir-action/pull/75 but the PR author deleted their fork :( - I've decided to make my own fork with the same changes for my own purposes, as well as create a PR to hopefully get it merged as well 🙏

The autogenerated commit this action produces always uses the username and email of the pusher. This commit adds support for changing these variables using the COMMIT_NAME and COMMIT_EMAIL environment variables. My particular use case was to mark these autogenerated commits as being created by the github-actions bot:

- name: Commit to Output
  uses: s0/git-publish-subdir-action@develop
  env:
    REPO: self
    BRANCH: output
    FOLDER: outputDir
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    COMMIT_NAME: "github-actions[bot]"
    COMMIT_EMAIL: "github-actions[bot]@users.noreply.github.com"

Checklist

promise avatar Oct 03 '22 08:10 promise