File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1111 type : string
1212 description : " Path to a file that will be passed as --breakage-allowlist-path to swift package diagnose-api-breaking-changes"
1313 default : " "
14+ api_breakage_check_baseline :
15+ type : string
16+ description : " The tag against which API breakages that should be used as the baseline for the API breakage check. By default the PR base is used."
17+ default : " "
1418 api_breakage_check_container_image :
1519 type : string
1620 description : " Container image for the API breakage check job. Defaults to latest Swift Ubuntu image."
@@ -102,12 +106,19 @@ jobs:
102106 if : ${{ inputs.linux_pre_build_command }}
103107 run : ${{ inputs.linux_pre_build_command }}
104108 - name : Run API breakage check
109+ shell : bash
105110 run : |
106- git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
111+ if [[ -z '${{ inputs.api_breakage_check_baseline }}' ]]; then
112+ git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
113+ BASELINE_REF='pull-base-ref'
114+ else
115+ BASELINE_REF='${{ inputs.api_breakage_check_baseline }}'
116+ fi
117+ echo "Using baseline: $BASELINE_REF"
107118 if [[ -z '${{ inputs.api_breakage_check_allowlist_path }}' ]]; then
108- swift package diagnose-api-breaking-changes pull-base-ref
119+ swift package diagnose-api-breaking-changes "$BASELINE_REF"
109120 else
110- swift package diagnose-api-breaking-changes pull-base-ref --breakage-allowlist-path '${{ inputs.api_breakage_check_allowlist_path }}'
121+ swift package diagnose-api-breaking-changes "$BASELINE_REF" --breakage-allowlist-path '${{ inputs.api_breakage_check_allowlist_path }}'
111122 fi
112123
113124 docs-check :
You can’t perform that action at this time.
0 commit comments