File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -127,11 +127,13 @@ jobs:
127
127
HEAD_SHA=$( echo ${{ github.event.pull_request.head.sha || github.sha }} | head -c7 )
128
128
echo "::set-output name=head_sha::$HEAD_SHA"
129
129
130
- - name : Should Push Docker Branch?
131
- id : push-branch
130
+ - name : Get Docker Tag
131
+ id : get-docker-tag-spec
132
132
run : |
133
133
if [[ "${{ github.event_name }}" == 'push' ]]; then
134
- echo "::set-output name=branch::type=ref,event=branch"
134
+ echo "::set-output name=spec::type=ref,event=branch"
135
+ else if [[ "${{ github.event_name }}" == 'pull_request' ]]; then
136
+ echo "::set-output name=spec::type=ref,event=pr"
135
137
fi
136
138
137
139
- name : Extract Metadata (tags, labels) For Docker
@@ -140,12 +142,12 @@ jobs:
140
142
with :
141
143
images : freyrcli/freyrjs-git
142
144
tags : |
143
- type=ref,event=pr
144
- ${{ steps.push-branch.outputs.branch }}
145
+ ${{ steps.get-docker-tag-spec.outputs.spec }}
145
146
type=raw,value=${{ steps.get-shas.outputs.head_sha }}
146
147
147
148
- name : Extract Tags
148
149
id : get-docker-tag
150
+ if : github.event_name == 'pull_request'
149
151
run : |
150
152
PR_TAG=$( echo "${{ steps.docker-meta.outputs.tags }}" | sed 's/freyrcli\/freyrjs-git://g' )
151
153
echo "::set-output name=tag::$PR_TAG"
You can’t perform that action at this time.
0 commit comments