diff --git a/.github/workflows/code_review.yml b/.github/workflows/code_review.yml index 630166cfd..9be2fc788 100644 --- a/.github/workflows/code_review.yml +++ b/.github/workflows/code_review.yml @@ -1,36 +1,24 @@ name: Code Review -# Controls when the workflow will run on: - pull_request: - branches: - - main - - develop - types: - - opened - - synchronize - - reopened - paths: - - 'onboarding-ms/**' - - 'onboarding-functions/**' - - 'onboarding-sdk/**' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -permissions: - id-token: write - contents: read - deployments: write + workflow_call: + inputs: + module: + required: true + type: choice + description: Select the module + options: + - onboarding-ms + - onboarding-functions # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: code-review: - name: Code Review onboarding-ms # The type of runner that the job will run on runs-on: ubuntu-latest - + env: + module: ${{ inputs.module || env.MODULE }} # Steps represent a sequence of tasks that will be executed as part of the job steps: - uses: actions/checkout@v4 @@ -67,7 +55,7 @@ jobs: -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} -Dsonar.pullrequest.branch=${{ github.head_ref }} -Dsonar.pullrequest.base=${{ github.base_ref }} - --file ./pom.xml + --file ${{ inputs.module }}/pom.xml env: # Needed to get some information about the pull request, if any GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/code_review_functions.yml b/.github/workflows/code_review_functions.yml new file mode 100644 index 000000000..f726471f0 --- /dev/null +++ b/.github/workflows/code_review_functions.yml @@ -0,0 +1,29 @@ +name: Code Review Functions + +# Controls when the workflow will run +on: + pull_request: + branches: + - main + - develop + types: + - opened + - synchronize + - reopened + paths: + - 'onboarding-functions/**' + +permissions: + id-token: write + contents: read + deployments: write + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + + code-review: + name: Code review onboarding-ms + # The type of runner that the job will run on + uses: pagopa/selfcare-onboarding/.github/workflows/code_review.yml@develop + with: + module: onboarding-functions \ No newline at end of file diff --git a/.github/workflows/code_review_ms.yml b/.github/workflows/code_review_ms.yml new file mode 100644 index 000000000..903eeb15b --- /dev/null +++ b/.github/workflows/code_review_ms.yml @@ -0,0 +1,29 @@ +name: Code Review MS + +# Controls when the workflow will run +on: + pull_request: + branches: + - main + - develop + types: + - opened + - synchronize + - reopened + paths: + - 'onboarding-ms/**' + +permissions: + id-token: write + contents: read + deployments: write + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + + code-review: + name: Code review onboarding-ms + # The type of runner that the job will run on + uses: pagopa/selfcare-onboarding/.github/workflows/code_review.yml@develop + with: + module: onboarding-ms \ No newline at end of file diff --git a/onboarding-ms/deploy-image-container-app.yaml b/onboarding-ms/deploy-image-container-app.yaml index 5f759e204..dd14c8b45 100644 --- a/onboarding-ms/deploy-image-container-app.yaml +++ b/onboarding-ms/deploy-image-container-app.yaml @@ -34,7 +34,6 @@ properties: value: $ONBOARDING_FUNCTIONS_URL$ - name: ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS value: $ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS$ - scale: minReplicas: 1 maxReplicas: 5 \ No newline at end of file