Skip to content

Commit db97fa7

Browse files
Update action.yml
1 parent 337c150 commit db97fa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/checkout/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ runs:
4343
if git ls-remote --heads --quiet --exit-code https://${{ inputs.token }}@github.com/${{ inputs.repository }}.git ${{ inputs.ref }}
4444
then
4545
echo "::notice::Checkout: ${{ inputs.repository }} using ${{ inputs.ref }}"
46-
echo "ref-exists=true" >> $GITHUB_OUTPUT
46+
echo "::set-output name=ref-exists::true" # Use ::set-output for boolean output
4747
else
4848
echo "::notice::Checkout: ${{ inputs.repository }} does not have ref ${{ inputs.ref }} (fallback to ${{ inputs.alternate_ref }})"
49-
echo "ref-exists=false" >> $GITHUB_OUTPUT
49+
echo "::set-output name=ref-exists::false" # Use ::set-output for boolean output
5050
fi
5151
52-
- if: steps.repo.outputs.ref-exists == 'true'
52+
- if: steps.repo.outputs.ref-exists
5353
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
5454
with:
5555
fetch-depth: ${{ inputs.fetch-depth }}
@@ -58,7 +58,7 @@ runs:
5858
ref: ${{ inputs.ref }}
5959
token: ${{ inputs.token }}
6060

61-
- if: steps.repo.outputs.ref-exists == 'false'
61+
- if: !steps.repo.outputs.ref-exists # Use ! for negation
6262
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
6363
with:
6464
fetch-depth: ${{ inputs.fetch-depth }}

0 commit comments

Comments
 (0)