Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try getting commit message from file. #193

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 37 additions & 7 deletions .github/workflows/automatic-pr-to-dash-copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,50 @@ jobs:
- uses: actions/checkout@v3
with:
ref: master
path: loopy
path: loopy-master
- uses: actions/checkout@v3
with:
ref: loopy-dash-only
path: loopy-dash
- name: Copy file to directory
run: cp loopy/loopy-dash.el loopy-dash/loopy-dash.el
- name: Commit new changes and push.
path: loopy-dash-only
- uses: actions/checkout@v3
with:
ref: loopy-only
path: loopy-only
- name: Copy commit message
run: |
cd loopy-master
git log \
--format='(GitHub Action) %s%n%nThis commit was copied from the master branch.%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 "loopy-dash.el" to directory "loopy-dash-only"
run: cp loopy-master/loopy-dash.el loopy-dash-only/loopy-dash.el
- name: Commit new changes and push for loopy-dash-only.
run: |
cd loopy-dash
cd loopy-dash-only
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
cd ..
env:
USERNAME: github-actions[bot]
- name: Copy all other files to directory "loopy-only"
run: |
shopt -u dotglob
cd loopy-master
rm -rf .git*/**
rm loopy-seq.el
cp -t ../loopy-only -r **
cd ..
- name: Commit new changes and push for loopy-only.
run: |
cd loopy-only
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --force .
git commit --allow-empty -F ../commit-msg.txt
git push
env:
USERNAME: github-actions[bot]
Loading