Skip to content

Commit

Permalink
PR reviews
Browse files Browse the repository at this point in the history
Signed-off-by: Kipruto <[email protected]>
  • Loading branch information
kelvinkipruto committed Sep 27, 2024
1 parent 4381049 commit 4afbf44
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/push-to-dokku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Push to Dokku
on:
workflow_call:
inputs:
remote_url:
git_remote_url:
required: true
type: string
description: "The remote URL to push to"
image_name:
deploy_docker_image:
required: true
type: string
description: "The name of the image to push"
Expand All @@ -20,6 +20,6 @@ jobs:
- name: Push
uses: dokku/[email protected]
with:
git_remote_url: ${{ inputs.remote_url }}
git_remote_url: ${{ inputs.git_remote_url }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
deploy_docker_image: ${{ inputs.image_name }}
deploy_docker_image: ${{ inputs.deploy_docker_image }}
25 changes: 5 additions & 20 deletions .github/workflows/techlabblog-deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Techlab Blog | Deploy Dev
name: Techlab Blog | Dev | Deploy

on:
push:
Expand All @@ -13,38 +13,23 @@ concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
cancel-in-progress: true

env:
SENTRY_ENVIRONMENT: "development"

jobs:
env-setup:
name: Environment Setup
runs-on: ubuntu-latest
outputs:
SENTRY_ENVIRONMENT: ${{ steps.env-setup.outputs.SENTRY_ENVIRONMENT }}
steps:
- name: Environment Setup
id: env-setup
run: |
echo "SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}" >> $GITHUB_ENV
build-docker-image:
name: Build Docker Image
needs: [env-setup]
uses: ./.github/workflows/build-docker-image.yml
secrets: inherit
with:
tags: "codeforafrica/techlabblog:${{ github.sha }}"
target: "techlabblog-runner"
build_args: |
SENTRY_ENVIRONMENT=${{ needs.env-setup.outputs.SENTRY_ENVIRONMENT }}
SENTRY_ENVIRONMENT=development
SENTRY_DSN: ${{ vars.TECHLABBLOG_SENTRY_DSN }}
push-to-dokku:
name: Push to Dokku
needs: [build-docker-image, env-setup]
needs: [build-docker-image]
uses: ./.github/workflows/push-to-dokku.yml
secrets: inherit
with:
remote_url: "ssh://[email protected]/techlabblog"
image_name: "codeforafrica/techlabblog:${{ github.sha }}"
git_remote_url: "ssh://[email protected]/techlabblog-ui"
deploy_docker_image: "codeforafrica/techlabblog:${{ github.sha }}"
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ pesayetu:
roboshield:
$(COMPOSE_BUILD_ENV) $(COMPOSE) --env-file apps/roboshield/.env.local up roboshield --build

techlabblog:
$(COMPOSE_BUILD_ENV) $(COMPOSE) --env-file apps/techlabblog/.env.local up techlabblog --build

vpnmanager:
$(COMPOSE_BUILD_ENV) $(COMPOSE) --env-file apps/vpnmanager/.env.local up vpnmanager --build

techlabblog:
$(COMPOSE_BUILD_ENV) $(COMPOSE) --env-file apps/techlabblog/.env.local up techlabblog --build

0 comments on commit 4afbf44

Please sign in to comment.