diff --git a/.github/workflows/automatic-pr-to-dash-copy.yml b/.github/workflows/automatic-pr-to-dash-copy.yml index 4b674018..ce76af90 100644 --- a/.github/workflows/automatic-pr-to-dash-copy.yml +++ b/.github/workflows/automatic-pr-to-dash-copy.yml @@ -4,6 +4,10 @@ on: branches: - main - master + pull_request: + branches: + - main + - master permissions: contents: write @@ -20,6 +24,13 @@ jobs: with: ref: loopy-dash-only path: loopy-dash + - name: Copy commit message + run: | + cd loopy + git log \ + --format='(GitHub Action) %s%n%nCommit: %H%nAuthor: %an <%ae>%nDate: %ai%n%n%B' \ + -n 1 --no-color --encoding=utf8 HEAD > ../commit-msg.txt + cd .. - name: Copy file to directory run: cp loopy/loopy-dash.el loopy-dash/loopy-dash.el - name: Commit new changes and push. @@ -28,7 +39,7 @@ jobs: git config --local user.name "github-actions[bot]" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git add --force loopy-dash.el - git commit --allow-empty -m "Automatic commit of changes from master branch." + git commit --allow-empty -F ../commit-msg.txt git push env: USERNAME: github-actions[bot]