Skip to content

Commit 85dd44b

Browse files
fix sha commit
1 parent 65ae19b commit 85dd44b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ jobs:
125125

126126
- name: Get short SHA
127127
id: short_sha
128-
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
128+
run: |
129+
if [ "${{ github.event_name }}" == "pull_request" ]; then
130+
echo "SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_ENV
131+
else
132+
echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
133+
fi
129134
130135
- name: Get Zonemaster-CLI version
131136
id: version
@@ -138,5 +143,5 @@ jobs:
138143
- name: upload artifact
139144
uses: actions/upload-artifact@v4
140145
with:
141-
name: Zonemaster-CLI-${{ steps.version.outputs.version }}-${{ steps.short_sha.outputs.short_sha }}
146+
name: Zonemaster-CLI-${{ steps.version.outputs.version }}-${{ env.SHORT_SHA }}
142147
path: Zonemaster-CLI-${{ steps.version.outputs.version }}.tar.gz

0 commit comments

Comments
 (0)