Skip to content

Commit 8f66b7a

Browse files
Commit before doing the branch filter
1 parent 56ff1bd commit 8f66b7a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
name: todos.json
4848
path: todos.json
4949

50-
- name: Stage the changes to Git
50+
- name: Stage and commit the changes made by the script to Git
5151
run: |
5252
set -e
5353
set -x
@@ -68,17 +68,17 @@ jobs:
6868
exit
6969
fi
7070
71+
# Commit the staged history-less changes to the workflow repository
72+
git commit -m "Generate the profile repository readme" -m "This commit was automatically generated via GitHub Actions"
73+
7174
- name: Drop history of auto-generated files (readme.md, prs.md issues.md)
7275
run: |
7376
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --force --index-filter "git rm --ignore-unmatch readme.md prs.md issues.md" --prune-empty HEAD
7477
75-
- name: Commit and force push Git changes back to the workflow repository
78+
- name: Force push Git changes back to the workflow repository
7679
run: |
7780
set -e
7881
set -x
7982
80-
# Commit the staged history-less changes to the workflow repository
81-
git commit -m "Generate the profile repository readme" -m "This commit was automatically generated via GitHub Actions"
82-
8383
# Push the commit to the workflow repository using force since we rewrote history
8484
git push origin HEAD:main --force

0 commit comments

Comments
 (0)