Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kilemensi committed Oct 8, 2024
1 parent 074968d commit e870028
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/_cd-charterafrica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ on:

jobs:
# This seem to be needed because GitHub doesn't support access `secrets` in a `with` clause
# when calling reusable workflows
# https://github.com/github/roadmap/issues/636
secrets:
runs-on: ubuntu-latest
outputs:
MONGO_URL: ${{ steps.output-secrets.outputs.test.CHARTERAFRICA_MONGO_URL }}
NEXT_PUBLIC_APP_LOGO_URL: ${{ steps.output-secrets.outputs.test.NEXT_PUBLIC_CODEFORAFRICA_APP_LOGO_URL }}
NEXT_PUBLIC_APP_NAME: ${{ steps.output-secrets.outputs.test.NEXT_PUBLIC_CODEFORAFRICA_APP_NAME }}
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ steps.output-secrets.outputs.test.CHARTERAFRICA_GA_MEASUREMENT_ID }}
NEXT_PUBLIC_SENTRY_DSN: ${{ steps.output-secrets.outputs.test.CHARTERAFRICA_SENTRY_DSN }}
PAYLOAD_SECRET: ${{ steps.output-secrets.outputs.test.CHARTERAFRICA_PAYLOAD_SECRET_KEY }}
SENTRY_PROJECT: ${{ steps.output-secrets.outputs.test.CODEFORAFRICA_SENTRY_PROJECT }}
MONGO_URL: ${{ steps.output-secrets.outputs.CHARTERAFRICA_MONGO_URL }}
NEXT_PUBLIC_APP_LOGO_URL: ${{ steps.output-secrets.outputs.NEXT_PUBLIC_CODEFORAFRICA_APP_LOGO_URL }}
NEXT_PUBLIC_APP_NAME: ${{ steps.output-secrets.outputs.NEXT_PUBLIC_CODEFORAFRICA_APP_NAME }}
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ steps.output-secrets.outputs.CHARTERAFRICA_GA_MEASUREMENT_ID }}
NEXT_PUBLIC_SENTRY_DSN: ${{ steps.output-secrets.outputs.CHARTERAFRICA_SENTRY_DSN }}
PAYLOAD_SECRET: ${{ steps.output-secrets.outputs.CHARTERAFRICA_PAYLOAD_SECRET_KEY }}
SENTRY_PROJECT: ${{ steps.output-secrets.outputs.CODEFORAFRICA_SENTRY_PROJECT }}
steps:
- id: output-secrets
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/_cd-codeforafrica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ on:

jobs:
# This seem to be needed because GitHub doesn't support access `secrets` in a `with` clause
# when calling reusable workflows
# https://github.com/github/roadmap/issues/636
secrets:
runs-on: ubuntu-latest
outputs:
MONGODB_URL: ${{ steps.output-secrets.outputs.test.CODEFORAFRICA_MONGODB_URL }}
NEXT_PUBLIC_APP_LOGO_URL: ${{ steps.output-secrets.outputs.test.NEXT_PUBLIC_CODEFORAFRICA_APP_LOGO_URL }}
NEXT_PUBLIC_APP_NAME: ${{ steps.output-secrets.outputs.test.NEXT_PUBLIC_CODEFORAFRICA_APP_NAME }}
PAYLOAD_SECRET: ${{ steps.output-secrets.outputs.test.CODEFORAFRICA_PAYLOAD_SECRET }}
SENTRY_PROJECT: ${{ steps.output-secrets.outputs.test.CODEFORAFRICA_SENTRY_PROJECT }}
MONGODB_URL: ${{ steps.output-secrets.outputs.CODEFORAFRICA_MONGODB_URL }}
NEXT_PUBLIC_APP_LOGO_URL: ${{ steps.output-secrets.outputs.NEXT_PUBLIC_CODEFORAFRICA_APP_LOGO_URL }}
NEXT_PUBLIC_APP_NAME: ${{ steps.output-secrets.outputs.NEXT_PUBLIC_CODEFORAFRICA_APP_NAME }}
PAYLOAD_SECRET: ${{ steps.output-secrets.outputs.CODEFORAFRICA_PAYLOAD_SECRET }}
SENTRY_PROJECT: ${{ steps.output-secrets.outputs.CODEFORAFRICA_SENTRY_PROJECT }}
steps:
- id: output-secrets
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI/CD [Main]

on:
pull_request:
branches: # PRs to the following branches will trigger the workflow
push:
branches:
- main
paths:
- ".github/workflows/**"
Expand All @@ -21,7 +21,6 @@ jobs:
uses: ./.github/workflows/_ci.yaml

apps-path-filter:
name:
uses: ./.github/workflows/_app-path-filter.yaml
secrets: inherit

Expand Down
37 changes: 18 additions & 19 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# name: CI [PR]
name: CI/CD [PR]

# on:
# pull_request:
# branches: # PRs to the following branches will trigger the workflow
# - main
# paths:
# - ".github/workflows/**"
# - "apps/**"
# - "packages/**"
on:
pull_request:
branches: # PRs to the following branches will trigger the workflow
- main
paths:
- ".github/workflows/**"
- "apps/**"
- "packages/**"

# # This allows a subsequently queued workflow run to interrupt previous runs
# concurrency:
# group: "${{ github.workflow }} @ ${{ github.ref }}"
# cancel-in-progress: true
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
cancel-in-progress: true

# jobs:
# ci:
# name: CI
# uses: ./.github/workflows/_ci.yaml

# # TODO: deploy Dokku preview apps here
jobs:
ci:
name: CI
uses: ./.github/workflows/_ci.yaml
# TODO: deploy Dokku preview apps here

0 comments on commit e870028

Please sign in to comment.