@@ -94,6 +94,11 @@ inputs:
9494 required : false
9595 default : " true"
9696
97+ linkchecker_offline :
98+ description : " Only check local/relative links, do not fetch remote links (true/false)"
99+ required : false
100+ default : " false"
101+
97102 linkchecker_max_concurrency :
98103 description : " Max concurrent requests for link checker"
99104 required : false
@@ -142,7 +147,12 @@ runs:
142147 - name : " Vars: PR Closed/Merged"
143148 shell : bash
144149 run : |
145- echo "IS_PR_CLOSED_OR_MERGED=${{ github.event.pull_request && (github.event.pull_request.closed_at || github.event.pull_request.merged) }}" >> $GITHUB_ENV
150+ PR_CLOSED_OR_MERGED="${{ github.event.pull_request && (github.event.pull_request.closed_at || github.event.pull_request.merged) }}"
151+ if [ -n "$PR_CLOSED_OR_MERGED" ] && [ "$PR_CLOSED_OR_MERGED" != "false" ]; then
152+ echo "IS_PR_CLOSED_OR_MERGED=true" >> $GITHUB_ENV
153+ else
154+ echo "IS_PR_CLOSED_OR_MERGED=false" >> $GITHUB_ENV
155+ fi
146156
147157 - name : " Vars: Prod or Preview"
148158 shell : bash
@@ -179,6 +189,11 @@ runs:
179189 else
180190 echo "LINKCHECKER_FRAGMENTS=" >> $GITHUB_ENV
181191 fi
192+ if ${{ inputs.linkchecker_offline }}; then
193+ echo "LINKCHECKER_OFFLINE=--offline" >> $GITHUB_ENV
194+ else
195+ echo "LINKCHECKER_OFFLINE=" >> $GITHUB_ENV
196+ fi
182197 if ${{ inputs.linkchecker_verbose }}; then
183198 echo "LINKCHECKER_VERBOSE=--verbose" >> $GITHUB_ENV
184199 else
@@ -217,6 +232,7 @@ runs:
217232 -r ${{ inputs.linkchecker_retry_times }}
218233 -u "${{ inputs.linkchecker_user_agent }}"
219234 ${{ env.LINKCHECKER_FRAGMENTS }}
235+ ${{ env.LINKCHECKER_OFFLINE }}
220236 ${{ env.LINKCHECKER_EXCLUDE }}
221237 ${{ env.LINKCHECKER_VERBOSE }}
222238 --max-concurrency ${{ inputs.linkchecker_max_concurrency }}
@@ -247,7 +263,7 @@ runs:
247263 with :
248264 host : ${{ inputs.ssh_host }}
249265 username : ${{ inputs.ssh_user }}
250- key : ${{ env .ssh_key }}
266+ key : ${{ inputs .ssh_key }}
251267 port : ${{ inputs.ssh_port }}
252268 timeout : ${{ inputs.ssh_timeout }}
253269 command_timeout : ${{ inputs.ssh_command_timeout }}
0 commit comments