Skip to content

Commit

Permalink
feat(provider): added cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-arc10 committed Feb 4, 2025
1 parent a0971ac commit 69a3c53
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
elif [[ "$tag" == provider-proxy/* ]]; then
echo "registry=${{ vars.PROVIDER_PROXY_REGISTRY }}" >> $GITHUB_ENV
echo "app=provider-proxy" >> $GITHUB_ENV
elif [[ "$tag" == provider-console/* ]]; then
echo "registry=${{ vars.PROVIDER_CONSOLE_REGISTRY }}" >> $GITHUB_ENV
echo "app=provider-console" >> $GITHUB_ENV
else
echo "Error: Unknown tag format = $tag"
exit 1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
git_tag="console-api/v$git_tag"
elif [ "${{ inputs.app }}" = "provider-proxy" ]; then
git_tag="provider-proxy/v$git_tag"
elif [ "${{ inputs.app }}" = "provider-console" ]; then
git_tag="provider-console/v$git_tag"
else
echo "Error: Unsupported app type '${{ inputs.app }}'."
exit 1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-pre-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
npm run release -w apps/api -- --verbose --ci
npm run release -w apps/deploy-web -- --verbose --ci
npm run release -w apps/provider-proxy -- --verbose --ci
npm run release -w apps/provider-console -- --verbose --ci
- name: Get Base Branch SHA
id: get-base-sha
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/docker-build-provider-console.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Web CI

on:
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Check for changes in provider-console folder
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
provider-console:
- 'apps/provider-console/**'
- name: Build the Docker image
if: steps.filter.outputs.provider-console == 'true'
run: packages/docker/script/dc.sh build provider-console --build-arg DEPLOYMENT_ENV=production
40 changes: 40 additions & 0 deletions .github/workflows/release-provider-console.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Deploy Web

on:
push:
branches:
- main
paths:
- "apps/provider-console/package.json"

jobs:
release:
name: Create Release
uses: ./.github/workflows/create-github-release.yml
secrets: inherit
with:
app: provider-console

build-beta:
needs: release
name: Build Beta Docker image
uses: ./.github/workflows/build-image.yml
secrets: inherit
permissions:
contents: write
packages: write
with:
tag: ${{ needs.release.outputs.version }}-beta
deployment-env: staging

build-prod:
needs: release
name: Build Prod Docker image
uses: ./.github/workflows/build-image.yml
secrets: inherit
permissions:
contents: write
packages: write
with:
tag: ${{ needs.release.outputs.version }}
deployment-env: production

0 comments on commit 69a3c53

Please sign in to comment.