-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use user's name and email to associate with commit
- Loading branch information
1 parent
4ba8ddd
commit 5fe71e1
Showing
1 changed file
with
12 additions
and
2 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 |
---|---|---|
|
@@ -31,10 +31,20 @@ jobs: | |
- name: Generate ER-model | ||
run: tox -e generate-er-model | ||
|
||
- name: Get user information from Github API | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
run: | | ||
echo "USER_INFO=$(gh api /users/${{ github.actor }})" >> "$GITHUB_ENV" | ||
- name: Add, commit and push changes | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "ER-model generator" | ||
if [ ${{ fromJson(env.USER_INFO).email }} ]; then | ||
git config user.email "${{ fromJson(env.USER_INFO).email }}" | ||
else | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
fi | ||
git config user.name "${{ fromJson(env.USER_INFO).name || github.actor }}" | ||
git add "docs/reference/img/ER_model.png" | ||
git commit -m "Update ER model" | ||
git push -u origin update-er-model-${{ github.run_number }} | ||
|