Last active
March 27, 2024 21:16
-
-
Save bdougie/c31ea9f59d9d049a732a046be017eb28 to your computer and use it in GitHub Desktop.
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
name: Sign off commits in UI | |
on: | |
pull_request: | |
paths: | |
- '*.md' | |
jobs: | |
sign-off-commit: | |
name: signing commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Sign the last commit | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git checkout "${GITHUB_HEAD_REF}" | |
git config --global user.name ${GITHUB_ACTOR} | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
git add . | |
git commit --amend --no-edit --signoff | |
git push -u origin ${GITHUB_HEAD_REF} -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment