This repository was archived by the owner on Dec 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - main
77 paths :
8- - ' icons/**'
9- - ' json/**'
8+ - ' icons/**'
9+ - ' json/**'
1010 workflow_dispatch :
1111
1212jobs :
4949 clean_and_move_json :
5050 runs-on : ubuntu-latest
5151 if : ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.modified, 'json') }}
52+
5253 steps :
5354 - name : Checkout repository
5455 uses : actions/checkout@v3
@@ -70,12 +71,21 @@ jobs:
7071 mv json/* .
7172 rmdir json
7273
74+ - name : Update all JSON files to change image paths
75+ run : |
76+ # Loop through the JSON files and replace the paths
77+ for file in *.json; do
78+ echo "Processing $file"
79+ # Replace "/icons/" with "/assets/media/icons/"
80+ sed -i 's|"/icons/|"/assets/media/icons/|g' "$file"
81+ done
82+
7383 - name : Commit changes to JSON branch
7484 run : |
7585 git config user.name "github-actions[bot]"
7686 git config user.email "github-actions[bot]@users.noreply.github.com"
7787 git add .
78- git commit -m "Moved json to root and cleaned JSON branch " || echo "No changes to commit"
88+ git commit -m "Updated image paths to /assets/media/icons/ " || echo "No changes to commit"
7989
8090 - name : Push changes to JSON branch
8191 run : |
You can’t perform that action at this time.
0 commit comments