.github/workflows/main.yml #4
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
on: | |
push: | |
branches: | |
- fastly_v5 | |
workflow_dispatch: | |
jobs: | |
replace-vars: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: fastly_v5 | |
- name: Replace var.magento["name"] with var.name | |
run: | | |
find . -type f -exec sed -i 's/var\.magento\[\("\)\([a-z_]*\)\("\)\]/var.\2/g' {} \; | |
- name: Commit changes | |
run: | | |
git config --local user.name "github-actions" | |
git config --local user.email "actions@github.com" | |
git add . | |
git commit -m "Replaced var.magento['name'] with var.name" | |
git push origin fastly_v5 |