-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from saadmk11/optional-username-email
Make Username and Email input optional and default to github-actions[bot]
- Loading branch information
Showing
3 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,17 +39,17 @@ Put this step inside your ``.github/workflows/workflow.yml`` file: | |
- name: Run Changelog CI | ||
uses: saadmk11/[email protected] | ||
with: | ||
# optional, you can provide any name for your changelog file, | ||
# Optional, you can provide any name for your changelog file, | ||
# defaults to ``CHANGELOG.md`` if not provided. | ||
changelog_filename: MY_CHANGELOG.md | ||
# optional, only required when you want to | ||
# Optional, only required when you want to | ||
# group your changelog by labels and titles | ||
config_file: changelog-ci-config.json | ||
# Optional, This will be used to configure git | ||
# defaults to ``github-actions[bot]`` if not provided. | ||
committer_username: 'test' | ||
committer_email: '[email protected]' | ||
env: | ||
# This will be used to configure git | ||
# you can use secrets for it as well | ||
USERNAME: 'test' | ||
EMAIL: '[email protected]' | ||
# optional, only required for ``private`` repositories | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
``` | ||
|
@@ -146,8 +146,6 @@ jobs: | |
changelog_filename: CHANGELOG.md | ||
config_file: changelog-ci-config.json | ||
env: | ||
USERNAME: ${{secrets.USERNAME}} | ||
EMAIL: ${{secrets.EMAIL}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
git config user.name ${USERNAME} | ||
git config user.email ${EMAIL} | ||
|
||
git fetch --prune --unshallow | ||
git checkout ${GITHUB_HEAD_REF} | ||
|
||
python /scripts/changelog-ci.py | ||
|
||
git config user.name ${INPUT_COMMITTER_USERNAME} | ||
git config user.email ${INPUT_COMMITTER_EMAIL} | ||
|
||
git add ${INPUT_CHANGELOG_FILENAME} | ||
git commit -m "Added Changelog" | ||
git push -u --force origin HEAD:${GITHUB_HEAD_REF} |