Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Follow Up] One Image #126

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/build-push-image.yaml
Original file line number Diff line number Diff line change
@@ -3,16 +3,11 @@ permissions: read-all

on:
workflow_call:
inputs:
environment:
required: true
type: string

jobs:
push_to_registry_env:
push_to_registry:
name: Push Docker Image to Docker Hub
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
@@ -35,5 +30,5 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: willnilges/meshforms:${{ inputs.environment }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-k8s.yaml
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ jobs:
--set aws.region="${{ vars.S3_REGION }}" \
--set meshforms.s3_bucket_name="${{ secrets.S3_BUCKET_NAME }}" \
--set meshforms.s3_base_name="${{ secrets.S3_BASE_NAME }}" \
--set image.tag="${{ inputs.environment }}" \
--set image.tag="latest" \
--set ingress.hosts[0].host="${{ vars.INGRESS_HOST }}",ingress.hosts[0].paths[0].path=/,ingress.hosts[0].paths[0].pathType=Prefix \
--set meshforms.recaptcha_v2_key="${{ secrets.RECAPTCHA_V2_KEY }}" \
--set meshforms.recaptcha_v3_key="${{ secrets.RECAPTCHA_V3_KEY }}"
30 changes: 5 additions & 25 deletions .github/workflows/publish-and-deploy.yaml
Original file line number Diff line number Diff line change
@@ -9,11 +9,9 @@ on:
- main

jobs:
push_to_registry_dev:
name: Push to dev3
push_to_registry:
name: Push to docker hub
uses: ./.github/workflows/build-push-image.yaml
with:
environment: dev3
secrets: inherit
if: github.ref == 'refs/heads/main'

@@ -23,16 +21,7 @@ jobs:
with:
environment: dev3
secrets: inherit
needs: push_to_registry_dev
if: github.ref == 'refs/heads/main'

push_to_registry_prod:
name: Push to prod1
uses: ./.github/workflows/build-push-image.yaml
with:
environment: prod1
secrets: inherit
needs: deploy_to_dev3
needs: push_to_registry
if: github.ref == 'refs/heads/main'

deploy_to_prod1:
@@ -41,16 +30,7 @@ jobs:
with:
environment: prod1
secrets: inherit
needs: push_to_registry_prod
if: github.ref == 'refs/heads/main'

push_to_registry_prod2:
name: Push to prod2
uses: ./.github/workflows/build-push-image.yaml
with:
environment: prod2
secrets: inherit
needs: deploy_to_prod1
needs: deploy_to_dev3
if: github.ref == 'refs/heads/main'

deploy_to_prod2:
@@ -59,5 +39,5 @@ jobs:
with:
environment: prod2
secrets: inherit
needs: push_to_registry_prod2
needs: deploy_to_prod1
if: github.ref == 'refs/heads/main'