Skip to content

Commit

Permalink
Merge pull request #73 from shopware/fix-default-token-auth-in-shopwe…
Browse files Browse the repository at this point in the history
…r-version

fix: only configure auth if token is provided
  • Loading branch information
pweyck authored Mar 11, 2025
2 parents 56fc387 + 4a1136d commit faaaadb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shopware-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)"
Expand All @@ -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

0 comments on commit faaaadb

Please sign in to comment.