Cleanup deleted files from dev in main #12
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: Cleanup deleted files from dev in main | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
merge-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Set Git config | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Github Actions" | |
- name: Merge dev to main | |
run: | | |
git pull | |
git merge --allow-unrelated-histories $(git commit-tree -p main -m "[Automated] Cleanup" origin/dev^{tree}) | |
- name: Use CHANGELOG and package.json from main | |
run: | | |
git checkout HEAD~1 CHANGELOG.md | |
git checkout HEAD~1 package.json | |
git commit --amend --no-edit --allow-empty | |
- name: Push | |
run: | | |
git push |