Skip to content

Commit 11ad5eb

Browse files
committed
fix: replace splitsh-action with inline steps for actions/checkout@v6 compatibility
The claudiodekker/splitsh-action Docker action fails with actions/checkout@v6 because v6 no longer sets the http.extraheader git config, causing `git config --unset-all` to fail under `set -e`. Replace with inline steps that download splitsh-lite directly and handle the missing config gracefully with `|| true`.
1 parent fa57db1 commit 11ad5eb

File tree

1 file changed

+46
-16
lines changed

1 file changed

+46
-16
lines changed

.github/workflows/split.yml

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ jobs:
1616

1717
steps:
1818
- name: "Checkout code"
19-
uses: "actions/checkout@v4"
19+
uses: "actions/checkout@v6"
2020
with:
2121
fetch-depth: 0
22+
persist-credentials: false
2223

2324
- name: "Resolve reference"
2425
id: "ref"
@@ -34,15 +35,29 @@ jobs:
3435
echo "is_tag=false" >> "$GITHUB_OUTPUT"
3536
fi
3637
37-
- name: "Split package"
38-
uses: "claudiodekker/splitsh-action@v1.0.0"
38+
- name: "Install splitsh-lite"
39+
run: |
40+
curl -sL https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz | tar xz -C /usr/local/bin
41+
42+
- name: "Split and push"
3943
env:
4044
GITHUB_TOKEN: ${{ secrets.SPLIT_TOKEN }}
41-
with:
42-
prefix: "math"
43-
remote: "https://github.com/simPod/phpstan-brick-math.git"
44-
reference: "${{ steps.ref.outputs.name }}"
45-
as_tag: "${{ steps.ref.outputs.is_tag }}"
45+
REMOTE: "https://github.com/simPod/phpstan-brick-math.git"
46+
REFERENCE: ${{ steps.ref.outputs.name }}
47+
IS_TAG: ${{ steps.ref.outputs.is_tag }}
48+
run: |
49+
git config --local --unset-all http.https://github.com/.extraheader || true
50+
51+
SHA=$(splitsh-lite --prefix=math)
52+
53+
REMOTE_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/simPod/phpstan-brick-math.git"
54+
55+
if [ "$IS_TAG" = "true" ]; then
56+
git tag -f "v${REFERENCE}" "$SHA"
57+
git push "$REMOTE_URL" "v${REFERENCE}"
58+
else
59+
git push "$REMOTE_URL" "$SHA:refs/heads/$REFERENCE"
60+
fi
4661
4762
split_money:
4863
name: "Split - money"
@@ -51,9 +66,10 @@ jobs:
5166

5267
steps:
5368
- name: "Checkout code"
54-
uses: "actions/checkout@v4"
69+
uses: "actions/checkout@v6"
5570
with:
5671
fetch-depth: 0
72+
persist-credentials: false
5773

5874
- name: "Resolve reference"
5975
id: "ref"
@@ -69,12 +85,26 @@ jobs:
6985
echo "is_tag=false" >> "$GITHUB_OUTPUT"
7086
fi
7187
72-
- name: "Split package"
73-
uses: "claudiodekker/splitsh-action@v1.0.0"
88+
- name: "Install splitsh-lite"
89+
run: |
90+
curl -sL https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz | tar xz -C /usr/local/bin
91+
92+
- name: "Split and push"
7493
env:
7594
GITHUB_TOKEN: ${{ secrets.SPLIT_TOKEN }}
76-
with:
77-
prefix: "money"
78-
remote: "https://github.com/simPod/phpstan-brick-money.git"
79-
reference: "${{ steps.ref.outputs.name }}"
80-
as_tag: "${{ steps.ref.outputs.is_tag }}"
95+
REMOTE: "https://github.com/simPod/phpstan-brick-money.git"
96+
REFERENCE: ${{ steps.ref.outputs.name }}
97+
IS_TAG: ${{ steps.ref.outputs.is_tag }}
98+
run: |
99+
git config --local --unset-all http.https://github.com/.extraheader || true
100+
101+
SHA=$(splitsh-lite --prefix=money)
102+
103+
REMOTE_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/simPod/phpstan-brick-money.git"
104+
105+
if [ "$IS_TAG" = "true" ]; then
106+
git tag -f "v${REFERENCE}" "$SHA"
107+
git push "$REMOTE_URL" "v${REFERENCE}"
108+
else
109+
git push "$REMOTE_URL" "$SHA:refs/heads/$REFERENCE"
110+
fi

0 commit comments

Comments
 (0)