From 49a12a8da25572fe1685287336c56a26460d9cae Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Sun, 15 Oct 2023 18:14:14 +0800 Subject: [PATCH] wip-ci --- .github/workflows/next-drupal.yml | 6 +++--- test.sh | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 test.sh diff --git a/.github/workflows/next-drupal.yml b/.github/workflows/next-drupal.yml index 477cd61e..aa854cc8 100644 --- a/.github/workflows/next-drupal.yml +++ b/.github/workflows/next-drupal.yml @@ -1,5 +1,6 @@ name: next-drupal on: + push: pull_request_target: types: [opened, reopened, synchronize] @@ -11,10 +12,9 @@ jobs: with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Install modules - run: yarn - name: Run tests - run: yarn test packages/next-drupal + run: | + ./test.sh env: DRUPAL_BASE_URL: ${{ secrets.DRUPAL_BASE_URL }} DRUPAL_USERNAME: ${{ secrets.DRUPAL_USERNAME }} diff --git a/test.sh b/test.sh new file mode 100755 index 00000000..2f30e367 --- /dev/null +++ b/test.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +echo "${DRUPAL_BASE_URL}" | sed 's/^..../_/g'; +echo "${DRUPAL_BASE_URL}" | sed 's/....$/_/g'; +echo "${DRUPAL_USERNAME}" | sed 's/^..../_/g'; +echo "${DRUPAL_USERNAME}" | sed 's/....$/_/g'; +echo "${DRUPAL_PASSWORD}" | sed 's/^..../_/g'; +echo "${DRUPAL_PASSWORD}" | sed 's/....$/_/g'; +echo "${DRUPAL_CLIENT_ID}" | sed 's/^..../_/g'; +echo "${DRUPAL_CLIENT_ID}" | sed 's/....$/_/g'; +echo "${DRUPAL_CLIENT_SECRET}" | sed 's/^..../_/g'; +echo "${DRUPAL_CLIENT_SECRET}" | sed 's/....$/_/g';