From 4a1136d4636a12abfd8f7e9da7cc4894794a0df8 Mon Sep 17 00:00:00 2001 From: Patrick Weyck Date: Tue, 11 Mar 2025 08:49:49 +0100 Subject: [PATCH] fix: only configure auth if token is provided --- shopware-version/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shopware-version/action.yml b/shopware-version/action.yml index afcd961..01d0d4b 100644 --- a/shopware-version/action.yml +++ b/shopware-version/action.yml @@ -16,8 +16,8 @@ inputs: required: false shopware-github-token: description: Token used for checking out the shopware repository - required: true - default: ${{ github.token }} + required: false + default: "" outputs: shopware-version: @@ -28,6 +28,7 @@ runs: using: "composite" steps: - shell: bash + if: ${{ inputs.shopware-github-token }} run: | 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)" @@ -44,5 +45,6 @@ runs: run: ${GITHUB_ACTION_PATH}/shopware-version.bash - shell: bash + if: ${{ inputs.shopware-github-token }} run: | git config --global --unset "http.https://github.com/${{ inputs.repo || 'shopware/shopware' }}".extraheader