Skip to content

Commit

Permalink
ci: use event sender as DCO signoff
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Molisani <[email protected]>
  • Loading branch information
molisani committed Nov 4, 2024
1 parent e22572e commit d82a1fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ jobs:

- run: git config --global user.name "github-actions[bot]"
- run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: cp scripts/dco_commit_msg_hook.sh .git/hooks/prepare-commit-msg

- run: npx nx release --yes ${{ inputs.dry-run && '--dry-run' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
DCO_NAME: ${{ sender.name }}
DCO_EMAIL: ${{ sender.email }}
5 changes: 5 additions & 0 deletions scripts/dco_commit_msg_hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: $DCO_NAME <$DCO_EMAIL>" \
--in-place "$1"

0 comments on commit d82a1fa

Please sign in to comment.