Skip to content

Commit

Permalink
try better ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Aug 1, 2024
1 parent ef9256d commit 5f49110
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/platform-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,70 +60,60 @@ jobs:
- uses: ./.github/actions/docker-build-report-to-pr

docker-build-unified:
if: |
github.event.pull_request.draft == false &&
(always() && needs.docker-prepare-report-comment.result == 'skipped')
if: github.event.pull_request.draft == false && !cancelled()
needs: [permissions-check, docker-prepare-report-comment]
name: Build Unified Image
uses: ./.github/workflows/.reusable-docker-build.yml
with:
target: oss-unified
image-name: flagsmith
ephemeral: ${{ needs.permissions-check.outputs.can-write == 'false' }}
comment: ${{ needs.permissions-check.outputs.can-write == 'true' }}
comment: ${{ needs.docker-prepare-report-comment.result == 'success' }}

docker-build-api:
if: |
github.event.pull_request.draft == false &&
(always() && needs.docker-prepare-report-comment.result == 'skipped')
if: github.event.pull_request.draft == false && !cancelled()
needs: [permissions-check, docker-prepare-report-comment]
name: Build API Image
uses: ./.github/workflows/.reusable-docker-build.yml
with:
target: oss-api
image-name: flagsmith-api
ephemeral: ${{ needs.permissions-check.outputs.can-write == 'false' }}
comment: ${{ needs.permissions-check.outputs.can-write == 'true' }}
comment: ${{ needs.docker-prepare-report-comment.result == 'success' }}

docker-build-frontend:
if: |
github.event.pull_request.draft == false &&
(always() && needs.docker-prepare-report-comment.result == 'skipped')
if: github.event.pull_request.draft == false && !cancelled()
needs: [permissions-check, docker-prepare-report-comment]
name: Build Frontend Image
uses: ./.github/workflows/.reusable-docker-build.yml
with:
target: oss-frontend
image-name: flagsmith-frontend
ephemeral: ${{ needs.permissions-check.outputs.can-write == 'false' }}
comment: ${{ needs.permissions-check.outputs.can-write == 'true' }}
comment: ${{ needs.docker-prepare-report-comment.result == 'success' }}

docker-build-api-test:
if: |
github.event.pull_request.draft == false &&
(always() && needs.docker-prepare-report-comment.result == 'skipped')
if: github.event.pull_request.draft == false && !cancelled()
needs: [permissions-check, docker-prepare-report-comment]
name: Build API Test Image
uses: ./.github/workflows/.reusable-docker-build.yml
with:
target: api-test
image-name: flagsmith-api-test
ephemeral: ${{ needs.permissions-check.outputs.can-write == 'false' }}
comment: ${{ needs.permissions-check.outputs.can-write == 'true' }}
comment: ${{ needs.docker-prepare-report-comment.result == 'success' }}
scan: false

docker-build-e2e:
if: |
github.event.pull_request.draft == false &&
(always() && needs.docker-prepare-report-comment.result == 'skipped')
if: github.event.pull_request.draft == false && !cancelled()
needs: [permissions-check, docker-prepare-report-comment]
name: Build E2E Image
uses: ./.github/workflows/.reusable-docker-build.yml
with:
file: frontend/Dockerfile.e2e
image-name: flagsmith-e2e
ephemeral: ${{ needs.permissions-check.outputs.can-write == 'false' }}
comment: ${{ needs.permissions-check.outputs.can-write == 'true' }}
comment: ${{ needs.docker-prepare-report-comment.result == 'success' }}
scan: false

docker-build-private-cloud:
Expand Down

0 comments on commit 5f49110

Please sign in to comment.