Skip to content

Commit db19be2

Browse files
committed
ci: fetch full history
1 parent 6ff591a commit db19be2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/previews-ods-ui.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v5
26+
# Fetch the full history for the branch to be able to get the short SHA
27+
with:
28+
ref: ${{ github.head_ref }}
29+
fetch-depth: 0
2630

2731
- name: Set up kubectl
2832
uses: azure/setup-kubectl@v4
@@ -35,8 +39,8 @@ jobs:
3539
- name: Configure some variables
3640
id: vars
3741
run: |
38-
echo "short_sha=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
39-
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" >> $GITHUB_OUTPUT
42+
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
43+
echo "branch=${GITHUB_HEAD_REF}" >> $GITHUB_OUTPUT
4044
4145
- name: Configure cluster context
4246
run: |

0 commit comments

Comments
 (0)