Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/users-svc
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdi Ardiansa committed Mar 1, 2024
2 parents 436c974 + 4c96e4a commit 1c7589b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,66 @@ run-name: 'deploy: ${{ github.sha }}'
on:
workflow_dispatch:
inputs:
auth_service:
auth_svc:
type: boolean
required: true
default: false
description: Auth service
user_service:
users_svc:
type: boolean
required: true
default: false
description: User service
post_service:
description: Users service
posts_svc:
type: boolean
required: true
default: false
description: Post service
description: Posts service
environment:
type: choice
description: Which server environment would you like to deploy?
options:
- staging
- production
jobs:
deploy-auth-service:
if: inputs.auth_service == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yml
deploy-auth-svc:
if: inputs.auth_svc == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yaml
with:
environment: ${{ inputs.environment }}
pre_built: true
pre_built_cmd: |
pnpm i
npx nx build @pinpin/auth-service
npx nx build @pinpin/auth-svc
secrets:
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_AUTH_SERVICE_ID }}
token: ${{ secrets.VERCEL_TOKEN }}

deploy-user-service:
if: inputs.user_service == true && (github.ref == 'refs/heads/staging' || github.refs == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yml
deploy-users-svc:
if: inputs.users_svc == true && (github.ref == 'refs/heads/staging' || github.refs == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yaml
with:
environment: ${{ inputs.environment }}
pre_built: true
pre_built_cmd: |
pnpm i
npx nx build @pinpin/user-service
npx nx build @pinpin/users-svc
secrets:
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_USER_SERVICE_ID }}
project_id: ${{ secrets.VERCEL_USERS_SERVICE_ID }}
token: ${{ secrets.VERCEL_TOKEN }}

deploy-post-service:
if: inputs.post_service == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yml
deploy-posts-svc:
if: inputs.posts_svc == true && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
uses: ./.github/workflows/wc-deploy-schema.yaml
with:
environment: ${{ inputs.environment }}
pre_built: true
pre_built_cmd: |
pnpm i
npx nx build @pinpin/post-service
npx nx build @pinpin/posts-svc
secrets:
org_id: ${{ secrets.VERCEL_ORG_ID }}
project_id: ${{ secrets.VERCEL_POST_SERVICE_ID }}
project_id: ${{ secrets.VERCEL_POSTS_SERVICE_ID }}
token: ${{ secrets.VERCEL_TOKEN }}
7 changes: 4 additions & 3 deletions scripts/generate-release-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ genereteVersion() {
populateArguments() {
for cmd in "$@";
do
IFS=-= read -a formattedValue <<< "${cmd//, ,}"
cmd="${cmd:2}"
IFS="=" read -a formattedValue <<< "${cmd//, ,}"
declare -p formattedValue

type="${formattedValue[2]}"
value="${formattedValue[3]}"
type="${formattedValue[0]}"
value="${formattedValue[1]}"

commands[${type}]=${value}
done
Expand Down

0 comments on commit 1c7589b

Please sign in to comment.