From f9acf84fe62f1b8fbfad31667fe98ea5be504ed2 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 14 Dec 2023 18:03:03 -0500 Subject: [PATCH 1/3] add brand plugin test workflow --- .github/workflows/brand-plugin-test.yml | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/brand-plugin-test.yml diff --git a/.github/workflows/brand-plugin-test.yml b/.github/workflows/brand-plugin-test.yml new file mode 100644 index 00000000..5ad5bfde --- /dev/null +++ b/.github/workflows/brand-plugin-test.yml @@ -0,0 +1,54 @@ +name: Build and Test Module Updates in Brand Plugins +on: + pull_request: + types: [ opened, reopened, ready_for_review, synchronize ] + branches: + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + outputs: + branch: ${{ steps.extract_branch.outputs.branch }} + steps: + + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + bluehost: + name: Bluehost Build and Test + needs: setup + uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main + with: + module-repo: ${{ github.repository }} + module-branch: ${{ needs.setup.outputs.branch }} + plugin-repo: 'bluehost/bluehost-wordpress-plugin' + secrets: inherit + + hostgator: + name: HostGator Build and Test + needs: setup + uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main + with: + module-repo: ${{ github.repository }} + module-branch: ${{ needs.setup.outputs.branch }} + plugin-repo: 'newfold-labs/wp-plugin-hostgator' + secrets: inherit + + crazydomains: + name: Crazy Domains Build and Test + needs: setup + uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main + with: + module-repo: ${{ github.repository }} + module-branch: ${{ needs.setup.outputs.branch }} + plugin-repo: 'newfold-labs/wp-plugin-crazy-domains' + secrets: inherit \ No newline at end of file From 2a647ee05884c16c8300bb676eb9be50a8c3b0ab Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 14 Dec 2023 18:05:16 -0500 Subject: [PATCH 2/3] include trunk PRs since that is main branch in this repo --- .github/workflows/brand-plugin-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/brand-plugin-test.yml b/.github/workflows/brand-plugin-test.yml index 5ad5bfde..08a374e2 100644 --- a/.github/workflows/brand-plugin-test.yml +++ b/.github/workflows/brand-plugin-test.yml @@ -4,6 +4,7 @@ on: types: [ opened, reopened, ready_for_review, synchronize ] branches: - main + - trunk workflow_dispatch: concurrency: From ac18de410b5115dc898f270b341504c529e2449b Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 14 Dec 2023 18:27:17 -0500 Subject: [PATCH 3/3] set `sync--npm-package` flag to true to account for build files --- .github/workflows/brand-plugin-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/brand-plugin-test.yml b/.github/workflows/brand-plugin-test.yml index 08a374e2..fcb489da 100644 --- a/.github/workflows/brand-plugin-test.yml +++ b/.github/workflows/brand-plugin-test.yml @@ -32,6 +32,7 @@ jobs: module-repo: ${{ github.repository }} module-branch: ${{ needs.setup.outputs.branch }} plugin-repo: 'bluehost/bluehost-wordpress-plugin' + sync-npm-package: true secrets: inherit hostgator: @@ -42,6 +43,7 @@ jobs: module-repo: ${{ github.repository }} module-branch: ${{ needs.setup.outputs.branch }} plugin-repo: 'newfold-labs/wp-plugin-hostgator' + sync-npm-package: true secrets: inherit crazydomains: @@ -52,4 +54,5 @@ jobs: module-repo: ${{ github.repository }} module-branch: ${{ needs.setup.outputs.branch }} plugin-repo: 'newfold-labs/wp-plugin-crazy-domains' + sync-npm-package: true secrets: inherit \ No newline at end of file