Skip to content

Commit ae4dd54

Browse files
committed
refactor: change logging output from to_summary to to_stdout for CI workflow
1 parent 56500aa commit ae4dd54

File tree

2 files changed

+12
-12
lines changed
  • .github/workflows
  • templates/AddNewPackage/content/.github/workflows

2 files changed

+12
-12
lines changed

.github/workflows/CI.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
[[ '${{ github.event_name }}' == 'push' && '${{ github.ref_name }}' == 'main' ]]; then
142142
143143
# For pull requests and pushes to the main branch, use the arg. values from env: vars, secrets, defaults
144-
info "Event: ${{ github.event_name }}. Using the argument values from the environment: vars, secrets, defaults." | to_summary
144+
info "Event: ${{ github.event_name }}. Using the argument values from the environment: vars, secrets, defaults." | to_stdout
145145
146146
elif [ '${{ github.event_name }}' == 'push' ] && [ '${{ github.ref_name }}' != 'main' ]; then
147147
@@ -160,16 +160,16 @@ jobs:
160160
--json headRefName \
161161
--jq 'map(select(.headRefName == "${{ github.ref_name }}")) | length'); then
162162
open_pr_count=0
163-
warning "Failed to query open PR-s via gh. Running push-triggered CI with SHORT_RUN." | to_summary
163+
warning "Failed to query open PR-s via gh. Running push-triggered CI with SHORT_RUN." | to_stdout
164164
fi
165-
info "Open PR count for '${{ github.ref_name }}': ${open_pr_count}" | to_summary
165+
info "Open PR count for '${{ github.ref_name }}': ${open_pr_count}" | to_stdout
166166
167167
# if there are open PRs, skip push-triggered CI - rely on the PR to trigger it
168168
if [ "${open_pr_count}" -gt 0 ]; then
169-
info "There are open PRs for this branch: skip the CI triggered by the push." | to_summary
169+
info "There are open PRs for this branch: skip the CI triggered by the push." | to_stdout
170170
skip_push='true'
171171
else
172-
info "No open PRs for this branch. Running push-triggered CI with SHORT_RUN preprocessor symbol for faster benchmarks." | to_summary
172+
info "No open PRs for this branch. Running push-triggered CI with SHORT_RUN preprocessor symbol for faster benchmarks." | to_stdout
173173
preprocessor_symbols="${preprocessor_symbols};SHORT_RUN"
174174
fi
175175
@@ -187,7 +187,7 @@ jobs:
187187
188188
else
189189
190-
echo "❌ ERROR: Unsupported event: ${{ github.event_name }}"
190+
error "Unsupported event: ${{ github.event_name }}" | to_stderr
191191
exit 5
192192
193193
fi

templates/AddNewPackage/content/.github/workflows/CI.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
[[ '${{ github.event_name }}' == 'push' && '${{ github.ref_name }}' == 'main' ]]; then
124124
125125
# For pull requests and pushes to the main branch, use the arg. values from env: vars, secrets, defaults
126-
info "Event: ${{ github.event_name }}. Using the argument values from the environment: vars, secrets, defaults." | to_summary
126+
info "Event: ${{ github.event_name }}. Using the argument values from the environment: vars, secrets, defaults." | to_stdout
127127
128128
elif [ '${{ github.event_name }}' == 'push' ] && [ '${{ github.ref_name }}' != 'main' ]; then
129129
@@ -142,16 +142,16 @@ jobs:
142142
--json headRefName \
143143
--jq 'map(select(.headRefName == "${{ github.ref_name }}")) | length'); then
144144
open_pr_count=0
145-
warning "Failed to query open PR-s via gh. Running push-triggered CI with SHORT_RUN." | to_summary
145+
warning "Failed to query open PR-s via gh. Running push-triggered CI with SHORT_RUN." | to_stdout
146146
fi
147-
info "Open PR count for '${{ github.ref_name }}': ${open_pr_count}" | to_summary
147+
info "Open PR count for '${{ github.ref_name }}': ${open_pr_count}" | to_stdout
148148
149149
# if there are open PRs, skip push-triggered CI - rely on the PR to trigger it
150150
if [ "${open_pr_count}" -gt 0 ]; then
151-
info "There are open PRs for this branch: skip the CI triggered by the push." | to_summary
151+
info "There are open PRs for this branch: skip the CI triggered by the push." | to_stdout
152152
skip_push='true'
153153
else
154-
info "No open PRs for this branch. Running push-triggered CI with SHORT_RUN preprocessor symbol for faster benchmarks." | to_summary
154+
info "No open PRs for this branch. Running push-triggered CI with SHORT_RUN preprocessor symbol for faster benchmarks." | to_stdout
155155
preprocessor_symbols="${preprocessor_symbols};SHORT_RUN"
156156
fi
157157
@@ -169,7 +169,7 @@ jobs:
169169
170170
else
171171
172-
echo "❌ ERROR: Unsupported event: ${{ github.event_name }}"
172+
error "Unsupported event: ${{ github.event_name }}" | to_stderr
173173
exit 5
174174
175175
fi

0 commit comments

Comments
 (0)