Skip to content

Commit

Permalink
ci: squash with previous commit once the job has created a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
null8626 committed Oct 28, 2024
1 parent ab4a6cc commit 486c560
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Pull previous commit
run: git reset --soft HEAD~1
shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.8'
Expand Down Expand Up @@ -45,6 +50,7 @@ jobs:
uses: EndBug/add-and-commit@v9
with:
commit: -S
message: 'style: prettier'
message: ${{ github.event.head_commit.message }}
push: --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 7 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Pull previous commit
run: git reset --soft HEAD~1
shell: bash
- uses: actions/setup-python@v5
with:
python-version: '3.13'
Expand All @@ -33,6 +38,7 @@ jobs:
uses: EndBug/add-and-commit@v9
with:
commit: -S
message: 'chore: update changelog.rst'
message: ${{ github.event.head_commit.message }}
push: --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 486c560

Please sign in to comment.