Skip to content

Squash commits

Squash commits #1

Workflow file for this run

name: Squash commits
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
jobs:
deploy:
name: Squash commits
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
steps:
- uses: actions/checkout@v4
with:
ref: 'gh-pages'
fetch-depth: 0
- name: Init repo
shell: bash
run: |
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
- name: Commit and push files
shell: bash
run: |
git reset --soft $(git log --grep 'THE HORiZON' | head -1 | sed 's|^commit *||')
git commit -m "Update packages"
git push -f