Squash git worktree #2
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: Squash git worktree | |
on: | |
schedule: | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
jobs: | |
squash: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository ποΈ | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.IVY_BRANCH_TOKEN }} | |
ref: main | |
fetch-depth: 0 | |
- name: Setup Git user π€ | |
run: | | |
git config --local user.email "ivy.branch@unify.ai" | |
git config --local user.name "ivy-branch" | |
- name: Squash commits | |
run: | | |
git reset $(git commit-tree HEAD^{tree} -m "π Weekly squash commit") | |
- name: Force push single commit | |
run: git push -f origin main | |