Skip to content

Commit fa84aab

Browse files
committed
Just one if per step
1 parent a1bf4e5 commit fa84aab

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

.github/workflows/backend.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ jobs:
5252
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
5353

5454
- name: Create staging
55-
if: github.ref == 'refs/heads/main'
55+
if: github.ref == 'refs/heads/main' && ${{ secrets.DOCKERHUB_USERNAME != '' }}
5656
run: docker buildx imagetools create -t ${{ secrets.DOCKERHUB_USERNAME }}/cupcake:staging ${{ secrets.DOCKERHUB_USERNAME }}/cupcake:latest
57-
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
5857

5958
- name: Upload reports if failed
6059
if: failure()

.github/workflows/frontend.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ jobs:
3939
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
4040

4141
- name: Create staging
42-
if: github.ref == 'refs/heads/main'
42+
if: github.ref == 'refs/heads/main' && ${{ secrets.DOCKERHUB_USERNAME != '' }}
4343
run: docker buildx imagetools create -t ${{ secrets.DOCKERHUB_USERNAME }}/frosting:staging ${{ secrets.DOCKERHUB_USERNAME }}/frosting:latest
44-
if: ${{ secrets.DOCKERHUB_USERNAME != '' }}
45-
4644

4745
- name: Generate summary
4846
run: |

0 commit comments

Comments
 (0)