diff --git a/.github/workflows/call_code_review.yml b/.github/workflows/call_code_review.yml index bb21ebbe..ecce242e 100644 --- a/.github/workflows/call_code_review.yml +++ b/.github/workflows/call_code_review.yml @@ -13,6 +13,9 @@ on: sonar_key: type: string required: true + actor: + type: string + required: true jobs: code_review: @@ -21,9 +24,9 @@ jobs: steps: - - name: Setup Maven Action - uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 + - name: Setup Maven Actionuses: s4u/maven-settings-action@60912582505985be4cc55d2b890eb32767f8de5f # pin@v2.8.0 with: + servers: '[{"id": "selfcare-github", "username": "${{ inputs.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]' checkout-fetch-depth: 0 java-version: 17 java-distribution: 'temurin' diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml deleted file mode 100644 index 5a770e7d..00000000 --- a/.github/workflows/check_pr.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Check PR - -# Controls when the workflow will run -on: - pull_request: - branches: - - main - types: - - opened - - synchronize - - reopened - -permissions: - pull-requests: write - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - - labeler: - name: Add label to PR based on the paths of files being changed - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # pin@v4 - - check_pr_size: - name: Check PR size doesn't break set limit - runs-on: ubuntu-latest - steps: - # checkout your code with your git history - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 - with: - fetch-depth: 0 - - - name: Get total lines changed - run: | - size=$(git diff --stat origin/main --diff-filter=d \ - | grep -v .lock \ - | awk -F"|" '{ print $2 }' \ - | awk '{ print $1 }' \ - | sed '/^$/d' \ - | paste -sd+ - \ - | bc) - - echo "size=${size}" >> $GITHUB_ENV - echo "" - echo "Total lines changed (note: *.lock files are excluded from this count): " - echo $size - shell: bash - - run: | - if [[ $size -gt 500 ]] - then - echo "Warning - total lines changed is greater than 500." - echo "Please consider breaking this PR down." - exit 1 - fi - shell: bash diff --git a/.github/workflows/pr_libs.yml b/.github/workflows/pr_libs.yml index d0f7d7bf..deee4615 100644 --- a/.github/workflows/pr_libs.yml +++ b/.github/workflows/pr_libs.yml @@ -30,3 +30,4 @@ jobs: source_branch: ${{ github.head_ref }} target_branch: ${{ github.base_ref }} sonar_key: 'pagopa_selfcare-user' + actor: ${{ github.actor }} diff --git a/.github/workflows/pr_ms.yml b/.github/workflows/pr_ms.yml index dd6d1052..74206b24 100644 --- a/.github/workflows/pr_ms.yml +++ b/.github/workflows/pr_ms.yml @@ -29,6 +29,7 @@ jobs: source_branch: ${{ github.head_ref }} target_branch: ${{ github.base_ref }} sonar_key: 'pagopa_selfcare-user' + actor: ${{ github.actor }} build_docker: name: 'Build Docker image'