File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
name : Build PYZ distribution
2
2
3
- run-name : ${{ github.event.release.tag_name || inputs.head-sha || github.event.workflow_run.display_title }}
3
+ run-name : ${{ github.event.release.tag_name || inputs.head-ref || github.event.workflow_run.display_title }}
4
4
5
5
on :
6
6
release :
15
15
16
16
workflow_dispatch :
17
17
inputs :
18
- head-sha :
18
+ head-ref :
19
19
default : " "
20
20
required : false
21
21
type : string
@@ -58,16 +58,21 @@ jobs:
58
58
id : head
59
59
if : fromJSON(steps.success.outputs.can-build)
60
60
env :
61
- HEAD_SHA : ${{ inputs.head-sha }}
61
+ HEAD_REF : ${{ inputs.head-ref }}
62
62
RUN_SHA : ${{ github.event.workflow_run.head_sha }}
63
63
run : |
64
- TARGET_SHA=${HEAD_SHA:-$RUN_SHA}
64
+ if [ -n "$HEAD_REF" ]
65
+ then
66
+ TARGET_REF="${HEAD_REF}^"
67
+ else
68
+ TARGET_REF="$RUN_SHA"
69
+ fi
65
70
66
- HEAD="$(git log --format=%H ${TARGET_SHA }.. | tail -n 1)"
71
+ HEAD="$(git log --format=%H ${TARGET_REF }.. | tail -n 1)"
67
72
68
73
if [ -z "$HEAD" ]
69
74
then
70
- echo "::error::could not find publish workflow changeset following ${TARGET_SHA :0:9}"
75
+ echo "::error::could not find publish workflow changeset following ${TARGET_REF :0:9}"
71
76
exit 1
72
77
fi
73
78
77
82
78
83
if [ -z "$TAGS" ]
79
84
then
80
- echo "::error::changeset following ${TARGET_SHA :0:9} does not appear to be tagged release: ${HEAD:0:9}"
85
+ echo "::error::changeset following ${TARGET_REF :0:9} does not appear to be tagged release: ${HEAD:0:9}"
81
86
exit 1
82
87
fi
83
88
You can’t perform that action at this time.
0 commit comments