Skip to content

Commit

Permalink
Use the correct PR module reference on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
joernott committed Mar 1, 2024
1 parent 99bdae0 commit eacaf69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/call-universal_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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
Expand Down Expand Up @@ -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}}'
Expand Down
15 changes: 0 additions & 15 deletions install_module/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit eacaf69

Please sign in to comment.