From eacaf69024ba930d69aac6df93499c4f628542ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Ott?= Date: Fri, 1 Mar 2024 14:21:36 +0100 Subject: [PATCH] Use the correct PR module reference on PR --- .../workflows/call-universal_test_workflow.yml | 5 ++++- install_module/action.yml | 15 --------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/call-universal_test_workflow.yml b/.github/workflows/call-universal_test_workflow.yml index 7370fbd1..82c01a47 100644 --- a/.github/workflows/call-universal_test_workflow.yml +++ b/.github/workflows/call-universal_test_workflow.yml @@ -480,6 +480,7 @@ jobs: debug: ${{ needs.init.outputs.debug }} - name: Checkout module + id: checkout_module if: ${{ matrix.testplan != 'skip' }} run: | AUTH="oxidci:${{ secrets.enterprise_github_token || github.token }}" @@ -495,12 +496,14 @@ jobs: git -C 'source/dev-packages/${{ steps.install_module_testplan.outputs.install_module_path }}' fetch origin \ refs/pull/${{ github.event.number }}/head:pr_${{ github.event.number }} git -C 'source/dev-packages/${{ steps.install_module_testplan.outputs.install_module_path }}' checkout pr_${{ github.event.number }} + echo "module_ref=pr_${{ github.event.number }}" >>"${GITHUB_OUTPUT}" else MODULE_REF="$(echo "${{ steps.install_module_testplan.outputs.install_module_git_module_ref }}"|sed -e 's|^dev-||')" git clone --depth 2 \ https://${AUTH}@github.com/${{ steps.install_module_testplan.outputs.install_module_git_module_url }}.git \ --branch "${MODULE_REF}" \ --single-branch 'source/dev-packages/${{ steps.install_module_testplan.outputs.install_module_path }}' + echo "module_ref=${MODULE_REF}" >>"${GITHUB_OUTPUT}" fi find . -type f >files.txt if [ '${{ inputs.debug }}' == 'true' ]; then @@ -557,7 +560,7 @@ jobs: module_path: 'dev-packages/${{ steps.install_module_testplan.outputs.install_module_path }}' activate: ${{ steps.install_module_testplan.outputs.install_module_activate }} git_module_url: ${{ steps.install_module_testplan.outputs.install_module_git_module_url }} - git_module_ref: ${{ steps.install_module_testplan.outputs.install_module_git_module_ref }} + git_module_ref: ${{ steps.checkout_module.outputs.module_ref }} output_files: ${{ steps.install_module_testplan.outputs.install_module_output_files }} # yamllint disable-line rule:line-length output_artifact: '${{steps.install_module_testplan.outputs.install_module_output_artifact_prefix}}-${{steps.install_module_testplan.outputs.install_module_ids}}-${{steps.install_module_testplan_name.outputs.matrix_suffix}}' diff --git a/install_module/action.yml b/install_module/action.yml index d3e73f32..4db9a270 100644 --- a/install_module/action.yml +++ b/install_module/action.yml @@ -124,21 +124,6 @@ runs: composer config -g github-oauth.github.com "${{ inputs.enterprise_github_token }}" fi - # - name: Install module - # shell: bash - # run: | - # # install_module: Install module - # ${{ inputs.debug }} - # docker compose ${{ inputs.container_method }} -T \ - # ${{ inputs. container_options }} \ - # ${{ inputs.container_name}} \ - # composer config repositories.${{ inputs.package_name }} \ - # --json '{"type":"path", "url":"./${{inputs.module_path}}", "options": {"symlink": true}}' - # docker compose ${{ inputs.container_method }} -T \ - # ${{ inputs. container_options }} \ - # ${{ inputs.container_name}} \ - # composer require ${{ inputs.package_name }}:${{ inputs.git_module_ref }} --no-interaction --no-update - - name: 'Modify composer.json' uses: 'OXID-eSales/github-actions/composer_merge@v4alpha' with: