Skip to content

Commit

Permalink
Merge branch 'master' into new-design-notifications-news
Browse files Browse the repository at this point in the history
  • Loading branch information
RalitsaIlieva authored Dec 14, 2023
2 parents a17dab3 + 740fd9e commit e4d87c8
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 64 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,34 +89,34 @@ jobs:
with:
image: ghcr.io/podkrepi-bg/frontend:${{ env.VERSION }}

scan-manifests:
name: Scan k8s manifests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install kustomize
uses: imranismail/setup-kustomize@v2

- name: Build development manifests
run: kustomize build manifests/overlays/development > dev-manifests.yaml

- name: Scan development manifests with Mondoo
uses: mondoohq/actions/k8s-manifest@main
env:
MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
with:
path: dev-manifests.yaml

- name: Build production manifests
run: kustomize build manifests/overlays/production > prod-manifests.yaml

- name: Scan production manifests with Mondoo
uses: mondoohq/actions/k8s-manifest@main
env:
MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
with:
path: prod-manifests.yaml
# scan-manifests:
# name: Scan k8s manifests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Install kustomize
# uses: imranismail/setup-kustomize@v2
#
# - name: Build development manifests
# run: kustomize build manifests/overlays/development > dev-manifests.yaml
#
# - name: Scan development manifests with Mondoo
# uses: mondoohq/actions/k8s-manifest@main
# env:
# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
# with:
# path: dev-manifests.yaml
#
# - name: Build production manifests
# run: kustomize build manifests/overlays/production > prod-manifests.yaml
#
# - name: Scan production manifests with Mondoo
# uses: mondoohq/actions/k8s-manifest@main
# env:
# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
# with:
# path: prod-manifests.yaml

run-playwright:
name: Run Playwright
Expand All @@ -126,7 +126,7 @@ jobs:
release-dev:
name: Release to dev
runs-on: ubuntu-latest
needs: [build-frontend-image, build-maintenance-image, scan-manifests, run-playwright]
needs: [build-frontend-image, build-maintenance-image, run-playwright]
environment:
name: dev
url: https://dev.podkrepi.bg
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,36 +71,36 @@ jobs:
with:
image: ghcr.io/podkrepi-bg/maintenance:pr

scan-manifests:
name: Scan k8s manifests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install kustomize
uses: imranismail/setup-kustomize@v2

- name: Build development manifests
run: kustomize build manifests/overlays/development > dev-manifests.yaml

- name: Scan development manifests with Mondoo
uses: mondoohq/actions/k8s-manifest@main
env:
MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
with:
path: dev-manifests.yaml

- name: Build production manifests
run: kustomize build manifests/overlays/production > prod-manifests.yaml

- name: Scan production manifests with Mondoo
uses: mondoohq/actions/k8s-manifest@main
env:
MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
with:
path: prod-manifests.yaml
# scan-manifests:
# name: Scan k8s manifests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.head.sha }}
#
# - name: Install kustomize
# uses: imranismail/setup-kustomize@v2
#
# - name: Build development manifests
# run: kustomize build manifests/overlays/development > dev-manifests.yaml
#
# - name: Scan development manifests with Mondoo
# uses: mondoohq/actions/k8s-manifest@main
# env:
# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
# with:
# path: dev-manifests.yaml
#
# - name: Build production manifests
# run: kustomize build manifests/overlays/production > prod-manifests.yaml
#
# - name: Scan production manifests with Mondoo
# uses: mondoohq/actions/k8s-manifest@main
# env:
# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }}
# with:
# path: prod-manifests.yaml

run-playwright:
name: Run Playwright
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ActiveCampaignCard({ campaign, index }: Props) {

const campaignImagesUrl = campaignListPictureUrl(campaign)

const reached = summary ? summary.reachedAmount + summary.guaranteedAmount : 0
const reached = summary ? summary.reachedAmount + (summary.guaranteedAmount ?? 0) : 0
const reachedAmount = moneyPublic(reached)
const targetAmount = moneyPublic(campaign.targetAmount)
const percentage = (reached / target) * 100
Expand Down
4 changes: 2 additions & 2 deletions src/components/client/campaigns/CampaignDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type CampaignFinanceProps = Props & {
expenses: number
}
const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) => {
const total = campaign.summary.guaranteedAmount + campaign.summary.reachedAmount
const total = (campaign.summary.guaranteedAmount ?? 0) + campaign.summary.reachedAmount
const transferred = campaign.summary.blockedAmount + campaign.summary.withdrawnAmount
return (
<StyledGrid item>
Expand All @@ -243,7 +243,7 @@ const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) =>
</Tooltip>
</Typography>
<Typography className={classes.financeSummary}>
Гарантирани: {moneyPublic(campaign.summary.guaranteedAmount)}
Гарантирани: {moneyPublic(campaign.summary.guaranteedAmount ?? 0)}
<Tooltip
enterTouchDelay={0}
title={
Expand Down
2 changes: 1 addition & 1 deletion src/components/client/campaigns/InlineDonation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default function InlineDonation({ campaign }: Props) {
state: campaignState,
slug: campaignSlug,
} = campaign
const reached = summary ? summary.reachedAmount + summary.guaranteedAmount : 0
const reached = summary ? summary.reachedAmount + (summary.guaranteedAmount ?? 0) : 0
const reachedAmount = moneyPublic(reached)
const targetAmount = moneyPublic(campaign.targetAmount)
const donors = summary?.donors ?? 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ActiveCampaignCard({ campaign, index }: Props) {
const { id, slug, title, summary, targetAmount: target } = campaign
const campaignImagesUrl = campaignListPictureUrl(campaign)

const reached = summary ? summary.reachedAmount + campaign.summary.guaranteedAmount : 0
const reached = summary ? summary.reachedAmount + (summary.guaranteedAmount ?? 0) : 0

const reachedAmount = moneyPublic(reached)
const targetAmount = moneyPublic(campaign.targetAmount)
Expand Down

0 comments on commit e4d87c8

Please sign in to comment.