diff --git a/.github/workflows/call_release_function.yml b/.github/workflows/call_release_function.yml index 527693341..03e4e201f 100644 --- a/.github/workflows/call_release_function.yml +++ b/.github/workflows/call_release_function.yml @@ -4,16 +4,17 @@ on: environment: type: string required: true - branch: + short_env: type: string - required: false - default: main + required: true jobs: release: name: 'Build & Release' runs-on: ubuntu-20.04 - environment: ${{ inputs.environment }}-cd + environment: + name: ${{ inputs.environment }}-cd + url: ${{ format('https://selc-{0}-onboarding-fn.azurewebsites.net', inputs.short_env) }} permissions: id-token: write packages: read diff --git a/.github/workflows/pr_functions.yml b/.github/workflows/pr_functions.yml index b5a32e216..b5eab7262 100644 --- a/.github/workflows/pr_functions.yml +++ b/.github/workflows/pr_functions.yml @@ -14,7 +14,6 @@ on: - ready_for_review paths: - 'apps/onboarding-functions/**' - - 'apps/onboarding-ms/pom.xml' - '.github/workflows/pr_functions.yml' - '.github/workflows/call_code_review.yml' diff --git a/.github/workflows/pr_ms.yml b/.github/workflows/pr_ms.yml index af74d0bf8..00f3ae900 100644 --- a/.github/workflows/pr_ms.yml +++ b/.github/workflows/pr_ms.yml @@ -14,7 +14,6 @@ on: - ready_for_review paths: - 'apps/onboarding-ms/**' - - 'apps/onboarding-ms/pom.xml' - '.github/workflows/pr_ms.yml' - '.github/workflows/call_code_review.yml' diff --git a/.github/workflows/release_functions.yml b/.github/workflows/release_functions.yml index 8357ef3d6..2fde77fa0 100644 --- a/.github/workflows/release_functions.yml +++ b/.github/workflows/release_functions.yml @@ -4,14 +4,39 @@ on: push: branches: - main - - releases/** + - releases/* + paths: + - 'apps/onboarding-functions/**' + - "apps/pom.xml" + - "pom.xml" workflow_dispatch: jobs: - release: + + release_dev: uses: ./.github/workflows/call_release_function.yml - name: OnBoarding function Release + name: '[Dev] OnBoarding function Release' + if: github.ref_name == 'main' secrets: inherit with: environment: dev + short_env: d + + release_uat: + uses: ./.github/workflows/call_release_function.yml + name: '[UAT] OnBoarding function Release' + if: startsWith(github.ref_name, 'releases/') + secrets: inherit + with: + environment: uat + short_env: u + + release_prod: + uses: ./.github/workflows/call_release_function.yml + name: '[Prod] OnBoarding function Release' + if: startsWith(github.ref_name, 'releases/') + secrets: inherit + with: + environment: prod + short_env: p