File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments