diff --git a/.github/workflows/drupal.yml b/.github/workflows/drupal.yml deleted file mode 100644 index 5e4d16523..000000000 --- a/.github/workflows/drupal.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Drupal - -on: - pull_request: - paths: - - apps/cms/** - - packages/drupal/** - -jobs: - - forgotten_config_changes: - name: Forgotten config changes - runs-on: ubuntu-latest - steps: - - - name: Checkout BASE - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.base.sha }} - - - name: Setup - uses: ./.github/actions/setup - - - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 - with: - server-token: "local" - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Drupal - run: cd apps/cms && pnpm turbo:build - env: - TURBO_API: 'http://127.0.0.1:9080' - TURBO_TOKEN: 'local' - TURBO_TEAM: 'local' - - - name: Checkout HEAD - run: git checkout ${{ github.event.pull_request.head.sha }} - - - name: Reinstall dependencies - run: pnpm i - - - name: Check if there are config changes after Drupal updates - env: - TURBO_API: 'http://127.0.0.1:9080' - TURBO_TOKEN: 'local' - TURBO_TEAM: 'local' - run: | - set -e - cd apps/cms - set -x - # Delete vendor dir to avoid potential issues with `composer install`. - rm -rf vendor - pnpm turbo:prep - output=$(pnpm drush -y updb --cache-clear=0 2>&1) - if echo $output | grep -q 'No pending updates' - then - echo "No drupal updates found." - exit 0 - fi - pnpm drush -y cr - pnpm drush -y cex - cd - - # Check Git changes ignoring the config translations. - if [[ $(git status --porcelain -- apps/cms/config ':!apps/cms/config/sync/language') ]] - then - git diff -- apps/cms/config > /tmp/drupal-config.patch - set +x - echo '➡️ WARNING: Found uncommitted Drupal config changes after applying Drupal database updates.' - echo '👉 There are two options to follow:' - echo '1) Download the drupal-config.patch artifact, apply it locally, review the changes, commit and push them.' - echo '2) Ignore this failure if you are really sure that everything is all right.' - false - else - set +x - echo 'Success: Found no new config changes.' - fi - - - name: Save drupal config as an artifact - if: failure() - uses: actions/upload-artifact@v3 - with: - name: drupal-config.patch - path: /tmp/drupal-config.patch