Fix tests that had left over edits that broke them. (#208) #56
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: Copy loopy-dash.el to other branch. | |
on: | |
push: | |
branches: | |
- main | |
- master | |
permissions: | |
contents: write | |
jobs: | |
copy_file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
path: loopy-master | |
- uses: actions/checkout@v3 | |
with: | |
ref: loopy-dash-only | |
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-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 -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-dash.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] |