Skip to content

Commit

Permalink
Update github-actions to 4.0.4 (#90)
Browse files Browse the repository at this point in the history
* Use exact module reference in install_module and comment redundant code
* Limit festure-branch modification
* Fix styles problem and move delete_artifact to the end of the respective actions
* Always cleanup plans
  • Loading branch information
release-github-action[bot] authored Mar 1, 2024
1 parent e2db12b commit 99bdae0
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 36 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/call-universal_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ jobs:
- name: 'SonarCloud Scan'
uses: 'OXID-eSales/github-actions/sonarcloud@v4'
with:
coverage_artifact: 'coverage-reports-**-${{ steps.sonarcloud_testplan_name.outputs.matrix_suffix }}'
coverage_artifact: 'coverage-reports-*-${{ steps.sonarcloud_testplan_name.outputs.matrix_suffix }}'
output_artifact: 'coverage-reports'
target_branch: ${{ steps.sonarcloud_testplan.outputs.sonarcloud_target_branch }}
strip_path: ${{ steps.sonarcloud_testplan.outputs.sonarcloud_strip_path }}
Expand Down Expand Up @@ -1260,7 +1260,7 @@ jobs:
priority: '230'
phase: report
job: styles
title: '${{ steps.styles_testplan.outputs.title }}'
title: '${{ steps.styles_testplan.outputs.styles_title }}'
php: ${{matrix.php}}
mysql: ${{matrix.mysql}}
status: ${{job.status}}
Expand Down Expand Up @@ -1388,3 +1388,18 @@ jobs:
cache_objects: |
${{ steps.generate_report.outputs.cache_objects }}
debug: ${{ needs.init.outputs.debug }}

- name: 'Remove temporary testplan artifacts'
if: ${{ always() }}
uses: geekyeggo/delete-artifact@v4
with:
name: 'testplan-*'
useGlob: true
failOnError: false

- name: 'Remove temporary coverage artifacts'
if: ${{ always() }}
uses: geekyeggo/delete-artifact@v4
with:
name: 'coverage-reports-*'
failOnError: false
7 changes: 0 additions & 7 deletions generate_report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@ runs:
path: '**'
retention-days: 7

- name: 'Remove temporary testplan artifacts'
uses: geekyeggo/delete-artifact@v4
with:
name: 'testplan-*'
useGlob: true
failOnError: false

- name: Send custom JSON data to Slack workflow
if: ${{ inputs.slack_webhook != '' }}
uses: slackapi/slack-github-action@v1
Expand Down
38 changes: 19 additions & 19 deletions install_module/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,20 @@ 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 }}:* --no-interaction --no-update
# - 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'
Expand All @@ -147,7 +147,7 @@ runs:
transform: |
{
"require": {
"${{ inputs.package_name }}": "*"
"${{ inputs.package_name }}": "dev-${{ inputs.git_module_ref }}"
},
"repositories": {
"${{ inputs.package_name }}": {
Expand All @@ -171,10 +171,10 @@ runs:
run: |
# install_module: Install dependencies and reset database
${{ inputs.debug }}
docker compose ${{ inputs.container_method }} -T \
${{ inputs. container_options }} \
${{ inputs.container_name}} \
composer update --no-interaction
# docker compose ${{ inputs.container_method }} -T \
# ${{ inputs. container_options }} \
# ${{ inputs.container_name}} \
# composer update --no-interaction
docker compose ${{ inputs.container_method }} -T \
${{ inputs. container_options }} \
${{ inputs.container_name}} \
Expand Down
10 changes: 8 additions & 2 deletions prepare_shop/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,14 @@ runs:
# prepare_shop: Modify composer.json to allow the same feature-branch
${{ inputs.debug }}
if [ -f '${{ inputs.composer_file }}' ]; then
sed -e 's#"oxid-esales/\(.*\)":[[:space:]]*"${{ inputs.composer_dev_ref }}"#"oxid-esales/\1": "dev-${{ inputs.github_ref_name }} || ${{ inputs.composer_dev_ref }}"#' \
-i '${{ inputs.composer_file }}'
BASE_BRANCH_PATTERN='^b-[0-9]+\.[0-9}+\.x$'
if [[ '${{ inputs.github_ref_name }}' =~ $BASE_BRANCH_PATTERN ]]; then
echo -e "\033[0;35mNot modifying composer.json because ${{ inputs.github_ref_name }} is a base branch\033[0m"
else
echo -e "\033[0;35mAllow dev-${{ inputs.github_ref_name }} for oxid-esales requires\033[0m"
sed -e 's#"oxid-esales/\(.*\)":[[:space:]]*"${{ inputs.composer_dev_ref }}"#"oxid-esales/\1": "dev-${{ inputs.github_ref_name }} || ${{ inputs.composer_dev_ref }}"#' \
-i '${{ inputs.composer_file }}'
fi
fi
# yamllint enable rule:line-length

Expand Down
6 changes: 0 additions & 6 deletions sonarcloud/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ runs:
name: ${{ inputs.output_artifact }}
path: coverage-reports

- name: 'Remove temporary coverage artifacts'
uses: geekyeggo/delete-artifact@v4
with:
name: '${{ inputs.coverage_artifact }}'
failOnError: false

- name: Set target branch
shell: bash
run: |
Expand Down

0 comments on commit 99bdae0

Please sign in to comment.