Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion setup-extension/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,22 @@ runs:
if [ -n "${dep_token}" ]; then
# if a custom token is provided use this token to clone
git config --global "http.${dep_repo}/.extraheader" "AUTHORIZATION: basic $(echo -n "x-access-token:${dep_token}" | base64)"
export GH_TOKEN="${dep_token}"
fi

git clone "$dep_repo" "custom/plugins/$dep_name"

if [ -n "${dep_branch}" ]; then
if [ "${dep_branch}" = ".auto" ]; then
echo "" >"$GITHUB_OUTPUT"
REPO="$(echo "${dep_repo}")" GH_TOKEN="$(echo "${dep_token}")" "${GITHUB_ACTION_PATH}/../shopware-version/shopware-version.bash"
REPO="$(echo "${dep_repo}")" "${GITHUB_ACTION_PATH}/../shopware-version/shopware-version.bash"
dep_branch=$(cat "$GITHUB_OUTPUT" | grep "^shopware-version=" | cut -d'=' -f2)
fi
if [ "${dep_branch}" != "trunk" ]; then
git -C custom/plugins/${dep_name} checkout ${dep_branch}
fi
fi
unset GH_TOKEN
done

- name: Install dependencies with Composer
Expand Down
2 changes: 1 addition & 1 deletion shopware-version/shopware-version.bash
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ echo "base ref: ${BASE_REF}"

# Normalize REPO to owner/repo format for gh api
REPO="${REPO#"https://github.com/"}"
REPO="${REPO%.git}"

ref_exists() {
local branch="${1#"refs/heads/"}"
Expand Down Expand Up @@ -122,4 +123,3 @@ fi
echo "Matching shopware version: $version"

echo "shopware-version=$version" >>"$GITHUB_OUTPUT"