-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
8807a9b
commit 1a93fb2
Showing
1 changed file
with
34 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: rm-non-svg | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["traffic2badge"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout traffic branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: traffic | ||
|
||
- name: Remove non-SVG files | ||
run: | | ||
find . -type f ! -name '*.svg' -delete | ||
- name: Commit changes | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add . | ||
git commit -m "Remove all files except .svg files" || echo "No changes to commit" | ||
- name: Push changes | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: traffic |