@@ -49,42 +49,24 @@ runs:
4949 REF_BRANCH=${REF/refs\/pull\//}
5050 REF_BRANCH=${REF_BRANCH/refs\/heads\//}
5151
52- if [[ -z "$GITHUB_OUTPUT" ]]; then
53- echo "::set-output name=base_ref_branch::$(eval printf "%s" "$BASE_REF")"
54- echo "::set-output name=head_ref_branch::$(eval printf "%s" "$HEAD_REF")"
55- echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")"
56- else
57- echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
58- echo "head_ref_branch=$(eval printf "%s" "$HEAD_REF")" >> "$GITHUB_OUTPUT"
59- echo "ref_branch=$(eval printf "%s" "$REF_BRANCH")" >> "$GITHUB_OUTPUT"
60- fi
52+ echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
53+ echo "head_ref_branch=$(eval printf "%s" "$HEAD_REF")" >> "$GITHUB_OUTPUT"
54+ echo "ref_branch=$(eval printf "%s" "$REF_BRANCH")" >> "$GITHUB_OUTPUT"
6155 else
6256 BASE_REF=$(printf "%q" "${{ github.event.base_ref }}")
6357 BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/}
6458
65- if [[ -z "$GITHUB_OUTPUT" ]]; then
66- echo "::set-output name=base_ref_branch::$(eval printf "%s" "$BASE_REF")"
67- else
68- echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
69- fi
59+ echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
7060 fi
7161 shell : bash
7262 - id : current_branch
7363 run : |
7464 # "Set the current branch name..."
7565 if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
7666 if [[ ${{ github.event_name }} == *"pull_request"* ]]; then
77- if [[ -z "$GITHUB_OUTPUT" ]]; then
78- echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref_branch }}"
79- else
80- echo "current_branch=${{ steps.branch.outputs.head_ref_branch }}" >> "$GITHUB_OUTPUT"
81- fi
67+ echo "current_branch=${{ steps.branch.outputs.head_ref_branch }}" >> "$GITHUB_OUTPUT"
8268 else
83- if [[ -z "$GITHUB_OUTPUT" ]]; then
84- echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
85- else
86- echo "current_branch=${{ steps.branch.outputs.ref_branch }}" >> "$GITHUB_OUTPUT"
87- fi
69+ echo "current_branch=${{ steps.branch.outputs.ref_branch }}" >> "$GITHUB_OUTPUT"
8870 fi
8971 fi
9072 shell : bash
@@ -93,21 +75,11 @@ runs:
9375 # "Set the default branch name..."
9476 if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
9577 if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ github.event.repository.default_branch }}" && "${{ github.event.pull_request.head.repo.fork }}" != "true" ]]; then
96- if [[ -z "$GITHUB_OUTPUT" ]]; then
97- echo "::set-output name=is_default::true"
98- echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
99- else
100- echo "is_default=true" >> "$GITHUB_OUTPUT"
101- echo "default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
102- fi
78+ echo "is_default=true" >> "$GITHUB_OUTPUT"
79+ echo "default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
10380 else
104- if [[ -z "$GITHUB_OUTPUT" ]]; then
105- echo "::set-output name=is_default::false"
106- echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
107- else
108- echo "is_default=false" >> "$GITHUB_OUTPUT"
109- echo "default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
110- fi
81+ echo "is_default=false" >> "$GITHUB_OUTPUT"
82+ echo "default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
11183 fi
11284 fi
11385 shell : bash
@@ -118,19 +90,10 @@ runs:
11890 REF=$(printf "%q" "${{ github.ref }}")
11991 TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
12092
121- if [[ -z "$GITHUB_OUTPUT" ]]; then
122- echo "::set-output name=tag::$(eval printf "%s" "$TAG")"
123- echo "::set-output name=is_tag::true"
124- else
125- echo "tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT"
126- echo "is_tag=true" >> "$GITHUB_OUTPUT"
127- fi
93+ echo "tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT"
94+ echo "is_tag=true" >> "$GITHUB_OUTPUT"
12895 else
129- if [[ -z "$GITHUB_OUTPUT" ]]; then
130- echo "::set-output name=is_tag::false"
131- else
132- echo "is_tag=false" >> "$GITHUB_OUTPUT"
133- fi
96+ echo "is_tag=false" >> "$GITHUB_OUTPUT"
13497 fi
13598 shell : bash
13699
0 commit comments