Replace vars #8
  
    
      This file contains hidden or 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
    
  
  
    
  | name: Replace vars | |
| on: workflow_dispatch | |
| permissions: | |
| contents: write | |
| jobs: | |
| replace-vars: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main_v5 | |
| - name: Replace var.app["name"] with var.name | |
| run: | | |
| find . -type f -exec sed -i 's/var\.app\[\("\)\([a-z_]*\)\("\)\]/var.\2/g' {} \; | |
| - name: Commit changes | |
| run: | | |
| git config --local user.name "magenx" | |
| git config --local user.email "[email protected]" | |
| git add . | |
| git commit -m "Replaced var.app['name'] with var.name" | |
| git push origin main_v5 |