File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-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."
@@ -103,11 +107,16 @@ jobs:
103107 run : ${{ inputs.linux_pre_build_command }}
104108 - name : Run API breakage check
105109 run : |
106- git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
110+ if [[ -z '${{ inputs.api_breakage_check_baseline }}' ]]; then
111+ git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
112+ BASELINE_REF='pull-base-ref'
113+ else
114+ BASELINE_REF='${{ inputs.api_breakage_check_baseline }}'
115+ fi
107116 if [[ -z '${{ inputs.api_breakage_check_allowlist_path }}' ]]; then
108- swift package diagnose-api-breaking-changes pull-base-ref
117+ swift package diagnose-api-breaking-changes "$BASELINE_REF"
109118 else
110- swift package diagnose-api-breaking-changes pull-base-ref --breakage-allowlist-path '${{ inputs.api_breakage_check_allowlist_path }}'
119+ swift package diagnose-api-breaking-changes "$BASELINE_REF" --breakage-allowlist-path '${{ inputs.api_breakage_check_allowlist_path }}'
111120 fi
112121
113122 docs-check :
You can’t perform that action at this time.
0 commit comments