diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57848d757..37570d96d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,23 +13,34 @@ jobs: containers: [0, 1, 2, 3, 4] steps: - - name: Checkout 🛎 + - name: Checkout screen builder uses: actions/checkout@v4 - uses: actions-ecosystem/action-regex-match@v2 - id: regex-match + id: install-vfe with: text: ${{ github.event.pull_request.body }} - regex: 'ci:vue-form-elements:(.*?)[\s\n\r]' - flags: 's' - - - name: debug - run: echo got '${{ steps.regex-match.outputs.group1 }}' + regex: 'ci:vue-form-elements:([^\s]+)' + + - name: set-vfe-branch + run: | + export VFE_BRANCH='' + if [[ ${{ contains(github.event.pull_request.body, 'ci:next') }} ]]; then + export VFE_BRANCH=next + fi + if [[ ${{ steps.install-vfe.outputs.match != '' }} ]]; then + export VFE_BRANCH=${{ steps.install-vfe.outputs.match }} + fi + echo "VFE_BRANCH=${VFE_BRANCH}" >> $GITHUB_ENV + + - name: Checkout vue-form-elements + if: ${{ env.VFE_BRANCH != '' }} + uses: actions/checkout@v4 + with: + repository: ProcessMaker/vue-form-elements + path: vue-form-elements + ref: ${{ env.VFE_BRANCH }} - - name: Checkout 🛎 - run: git clone --depth 1 -b ${{ steps.regex-match.outputs.group1 }} https://github.com/ProcessMaker/vue-form-elements - if: ${{ steps.regex-match.outputs.match != null }} - - name: Setup node env 🏗 uses: actions/setup-node@master with: @@ -38,7 +49,7 @@ jobs: cache: 'npm' - name: Install vue-form-elements dependencies - if: ${{ steps.regex-match.outputs.match != null }} + if: ${{ env.VFE_BRANCH != '' }} working-directory: vue-form-elements run: npm ci && npm run build-bundle @@ -46,7 +57,7 @@ jobs: run: npm ci - name: Link vue-form-elements - if: ${{ steps.regex-match.outputs.match != null }} + if: ${{ env.VFE_BRANCH != '' }} run: npm link ./vue-form-elements # - name: Run linter 👀