Skip to content

Commit 3420115

Browse files
committed
Removes gh-cache updates
1 parent 6d230de commit 3420115

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

.github/actions/gh-cache/save/action.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,12 @@ runs:
9494
git config user.email "github-actions[bot]@users.noreply.github.com"
9595
git commit -m "$(printf 'Save artifact: %s' "${{ inputs.path }}")" \
9696
&& echo "Committed '${{ inputs.path }}' to 'gh-cache' branch" \
97-
|| { echo "No changes to commit"; exit 0; }
98-
# Push with retry to handle concurrent updates to gh-cache
99-
for attempt in 1 2 3; do
100-
if git push origin gh-cache 2>/dev/null; then
101-
echo "Pushed to 'gh-cache' branch"
102-
break
103-
fi
104-
echo "Push failed (attempt $attempt), rebasing and retrying..."
97+
|| echo "No changes to commit"
98+
if git ls-remote --exit-code --heads origin gh-cache >/dev/null; then
10599
git fetch origin gh-cache
106100
git rebase origin/gh-cache
107-
done
101+
fi
102+
git push origin gh-cache
108103
else
109104
echo "'${{ inputs.path }}' does not exist"
110105
echo "Skipping commit and push"

0 commit comments

Comments
 (0)