Skip to content

Commit

Permalink
Create rm-non-svg.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ramajoballester authored May 19, 2024
1 parent 8807a9b commit 1a93fb2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/rm-non-svg.yml
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

0 comments on commit 1a93fb2

Please sign in to comment.