Skip to content

Commit

Permalink
ci: Setting up git commiter (#3095) (#3097)
Browse files Browse the repository at this point in the history
Co-authored-by: Sion Kang <[email protected]>
  • Loading branch information
lablup-octodog and Yaminyam authored Nov 14, 2024
1 parent 29fcaab commit a9c574d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/assign-pr-number.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ jobs:
run: |
author_name=$(git show -q --pretty='format:%an')
author_email=$(git show -q --pretty='format:%ae')
echo "Retrieved author information: $author_name <$author_email>"
echo "name=$author_name" >> $GITHUB_OUTPUT
echo "email=$author_email" >> $GITHUB_OUTPUT
- name: Make commit message for changing change log file
uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ steps.assign_pr_number.outputs.has_renamed_pairs == 'true' }}
with:
commit_author: ${{ steps.get_author_info.outputs.name }} <${{ steps.get_author_info.outputs.email }}>
commit_message: "docs: Rename the news fragment with the PR number\n\n${{ join(fromJSON(steps.assign_pr_number.outputs.rename_results), '\n') }}"
git config user.email "$author_email"
git config user.name "$author_name"
git commit \
-m "docs: Rename the news fragment with the PR number\n\n${{ join(fromJSON(steps.assign_pr_number.outputs.rename_results), '\n') }}" \
--author="$author_name <$author_email>" \
--trailer "Co-authored-by: octodog <[email protected]>"
git push
4 changes: 2 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
env:
COMMIT_MESSAGE: ${{ needs.backport-target-branch.outputs.commit_message }}
run: |
git config --global user.name "${{ needs.backport-target-branch.outputs.author }}"
git config --global user.email "${{ needs.backport-target-branch.outputs.author_email }}"
git config user.name "${{ needs.backport-target-branch.outputs.author }}"
git config user.email "${{ needs.backport-target-branch.outputs.author_email }}"
git fetch origin main --depth=10
git cherry-pick --strategy=recursive --strategy-option=theirs ${{ needs.backport-target-branch.outputs.latest_commit }}
git commit \
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/update-api-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ jobs:
run: |
author_name=$(git show -q --pretty='format:%an')
author_email=$(git show -q --pretty='format:%ae')
echo "Retrieved author information: $author_name <$author_email>"
echo "name=$author_name" >> $GITHUB_OUTPUT
echo "email=$author_email" >> $GITHUB_OUTPUT
- name: Make commit message for changing change log file
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: ${{ steps.get_author_info.outputs.name }} <${{ steps.get_author_info.outputs.email }}>
commit_message: 'chore: update GraphQL schema dump'
git config user.email "$author_email"
git config user.name "$author_name"
git commit \
-m "chore: update GraphQL schema dump" \
--author="$author_name <$author_email>" \
--trailer "Co-authored-by: octodog <[email protected]>"
git push
graphql-inspector:
needs: graphql-updated
Expand Down

0 comments on commit a9c574d

Please sign in to comment.