Skip to content

Remove non-SVG files #3

Remove non-SVG files

Remove non-SVG files #3

Workflow file for this run

name: Remove non-SVG files
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
fetch-depth: 0 # Ensure the entire history is fetched
- name: Set up Git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Remove non-SVG files
run: |
find . -type f ! -name '*.svg' -delete
- name: Commit changes
run: |
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.TRAFFIC_TOKEN }}
branch: traffic