-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,25 +51,22 @@ jobs: | |
# Commit modified files | ||
- name: Commit deleted files | ||
id: commit_it | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "Template cleanup" | ||
# Push changes | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: main | ||
pushed_it=true | ||
git push || pushed_it=false | ||
echo ::set-output name=pushed_it::$pushed_it | ||
# If main is already protected, then file a PR | ||
- name: Create PR with deleted files | ||
if: ${{ failure() }} | ||
if: steps.commit_it.outputs.pushed_it == 'false' | ||
uses: peter-evans/create-pull-request@v3 | ||
id: pr | ||
with: | ||
token: ${{ secrets.GH_PAT }} | ||
commit-message: Delete unnecessary files | ||
signoff: false | ||
branch: auto_copy_rendered_files | ||
|
@@ -78,7 +75,7 @@ jobs: | |
body: | | ||
### Description: | ||
This PR was initiated by the github actions. It helps set up this repository to be ready to write your course. | ||
It deletes some remnant files you don't need | ||
It deletes some remnant files you don't need for your course but were used when this was a template. | ||
labels: | | ||
automated | ||
reviewers: $GITHUB_ACTOR | ||
|