Skip to content

Commit 24ba381

Browse files
committed
Detection logic
1 parent d014fb8 commit 24ba381

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/update-kube-stack-version.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ jobs:
3434
- name: Check for changes
3535
id: verify-changed-files
3636
run: |
37-
# Check if there are commits ahead of origin/main
38-
COMMITS_AHEAD=$(git rev-list --count origin/main..HEAD)
37+
# Check if there are commits ahead of the remote HEAD
38+
REMOTE_HEAD=$(git ls-remote --symref origin HEAD | awk '/^ref:/ {print $2}' | sed 's|refs/heads/||')
39+
COMMITS_AHEAD=$(git rev-list --count origin/$REMOTE_HEAD..HEAD)
3940
if [ "$COMMITS_AHEAD" -gt 0 ]; then
4041
echo "changed=true" >> $GITHUB_OUTPUT
4142
else

0 commit comments

Comments
 (0)