Merge pull request #23084 from pradpnayak/paypalipnchangemaount
[civicrm-core.git] / .github / workflows / regen.yml
index 7d41ccb12cb7e9afbfd03e1fc6950180bacb86e0..47aa736be2ce52fffe3be01bb353ab7e4c114f5c 100644 (file)
@@ -21,8 +21,13 @@ on:
         description: Autocommit to branch (y or n)
         required: false
         default: 'n'
+permissions:
+  contents: read
+
 jobs:
   runregen:
+    permissions:
+      contents: write  # for Git to git push
     runs-on: ubuntu-latest
     name: Run Regen
     services:
@@ -81,6 +86,8 @@ jobs:
           php GenCode.php
           cd ..
           $GITHUB_WORKSPACE/civicrm-cv/bin/cv core:install --cms-base-url=http://civi.localhost
+          # In this environment in this particular repo, we are under a workspace folder that contains the literal "civicrm-core" in the path, which makes civicrm.config.php think we are a composer install, so it gets the paths wrong.
+          echo '<?php define("CIVICRM_CONFDIR", "/home/runner/work/civicrm-core/civicrm-core/drupal/sites/default");' > settings_location.php
       - name: regen
         run: |
           cd $GITHUB_WORKSPACE/drupal/sites/all/modules/civicrm/bin