From 7b5836e2c59ad3e077793504d64698e9c180915d Mon Sep 17 00:00:00 2001 From: Patrick Weyck Date: Mon, 10 Mar 2025 17:01:42 +0100 Subject: [PATCH] ci: use default for shopware-repository if empty string is passed --- .github/workflows/admin-eslint.yml | 2 +- eslint/action.yml | 2 +- setup-extension/action.yml | 2 +- shopware-version/action.yml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/admin-eslint.yml b/.github/workflows/admin-eslint.yml index d22f81e..8e01532 100644 --- a/.github/workflows/admin-eslint.yml +++ b/.github/workflows/admin-eslint.yml @@ -37,7 +37,7 @@ jobs: - name: Clone Shopware uses: actions/checkout@v4 with: - repository: ${{ inputs.shopware-repository }} + repository: ${{ inputs.shopware-repository || 'shopware/shopware' }} ref: ${{ steps.version.outputs.shopware-version || inputs.shopwareVersion }} - name: Clone Extension uses: actions/checkout@v4 diff --git a/eslint/action.yml b/eslint/action.yml index c25bc1b..79248cb 100644 --- a/eslint/action.yml +++ b/eslint/action.yml @@ -56,7 +56,7 @@ runs: - name: Clone Shopware uses: actions/checkout@v4 with: - repository: ${{ inputs.shopware-repository }} + repository: ${{ inputs.shopware-repository || 'shopware/shopware' }} ref: ${{ steps.version.outputs.shopware-version || inputs.shopwareVersion }} token: ${{ inputs.shopware-github-token }} diff --git a/setup-extension/action.yml b/setup-extension/action.yml index fd37491..1e899cd 100644 --- a/setup-extension/action.yml +++ b/setup-extension/action.yml @@ -112,7 +112,7 @@ runs: uses: shopware/setup-shopware@main with: shopware-version: ${{ steps.version.outputs.shopware-version || inputs.shopwareVersion }} - shopware-repository: ${{ inputs.shopware-repository }} + shopware-repository: ${{ inputs.shopware-repository || 'shopware/shopware' }} shopware-github-token: ${{ inputs.shopware-github-token }} php-version: ${{ inputs.phpVersion }} mysql-version: ${{ inputs.mysqlVersion }} diff --git a/shopware-version/action.yml b/shopware-version/action.yml index d477e28..afcd961 100644 --- a/shopware-version/action.yml +++ b/shopware-version/action.yml @@ -29,7 +29,7 @@ runs: steps: - shell: bash run: | - git config --global "http.https://github.com/${{ inputs.repo }}".extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ inputs.shopware-github-token }}" | base64 -w0)" + git config --global "http.https://github.com/${{ inputs.repo || 'shopware/shopware' }}".extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ inputs.shopware-github-token }}" | base64 -w0)" - name: Get shopware version id: get-version @@ -38,11 +38,11 @@ runs: REF: "${{ github.ref }}" BASE_REF: "${{ github.base_ref }}" HEAD_REF: "${{ github.head_ref }}" - REPO: "${{ inputs.repo }}" + REPO: "${{ inputs.repo || 'shopware/shopware' }}" CURRENT_REPO: "${{ github.repository }}" FALLBACK: "${{ inputs.fallback || 'trunk' }}" run: ${GITHUB_ACTION_PATH}/shopware-version.bash - shell: bash run: | - git config --global --unset "http.https://github.com/${{ inputs.repo }}".extraheader + git config --global --unset "http.https://github.com/${{ inputs.repo || 'shopware/shopware' }}".extraheader