Skip to content

Commit d288f88

Browse files
committed
Have all steps require previous steps to succeed
1 parent 407bf54 commit d288f88

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ runs:
9292
core.setFailed("'push_image' specified but missing 'registry_url', 'registry_user', or 'registry_pass'")
9393
9494
- id: generate-tags
95+
if: success()
9596
name: Generate tag list
9697
shell: bash
9798
env:
@@ -130,17 +131,19 @@ runs:
130131
echo "cache_key=$(tr ':/' '_' <<< $TIMESTAMP_IMAGE)_buildx_${GITHUB_SHA}" >> ${GITHUB_OUTPUT}
131132
132133
- name: Set up Docker Buildx
134+
if: success()
133135
uses: docker/setup-buildx-action@v1
134136

135137
- name: Container Registry Login
136-
if: fromJSON(inputs.push_image)
138+
if: success() && fromJSON(inputs.push_image)
137139
uses: docker/login-action@v1
138140
with:
139141
registry: ${{ inputs.registry_url }}
140142
username: ${{ inputs.registry_user }}
141143
password: ${{ inputs.registry_pass }}
142144

143145
- name: Build and push Docker images
146+
if: success()
144147
uses: docker/[email protected]
145148
with:
146149
push: ${{ fromJSon(inputs.push_image) }}
@@ -154,7 +157,7 @@ runs:
154157
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
155158

156159
- name: Cache Docker images
157-
if: fromJSON(inputs.cache_image)
160+
if: success() && fromJSON(inputs.cache_image)
158161
uses: actions/cache@v2
159162
with:
160163
path: /tmp/.buildx-cache

0 commit comments

Comments
 (0)