We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d014fb8 commit 24ba381Copy full SHA for 24ba381
.github/workflows/update-kube-stack-version.yml
@@ -34,8 +34,9 @@ jobs:
34
- name: Check for changes
35
id: verify-changed-files
36
run: |
37
- # Check if there are commits ahead of origin/main
38
- COMMITS_AHEAD=$(git rev-list --count origin/main..HEAD)
+ # Check if there are commits ahead of the remote HEAD
+ 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)
40
if [ "$COMMITS_AHEAD" -gt 0 ]; then
41
echo "changed=true" >> $GITHUB_OUTPUT
42
else
0 commit comments