2323
2424jobs :
2525 metadata :
26- if : github.event.workflow_run.conclusion == 'success ' || github.event_name == 'workflow_call '
26+ if : github.event_name != 'workflow_run ' || github.event.workflow_run.conclusion == 'success '
2727 runs-on : [self-hosted, X64, Linux, dev]
2828 outputs :
2929 sha : ${{ steps.metadata.outputs.sha }}
@@ -48,17 +48,13 @@ jobs:
4848 echo "source=pr" >> $GITHUB_OUTPUT
4949 echo "source_id=$(jq -r '.pr_id' metadata.json)" >> $GITHUB_OUTPUT
5050 ;;
51- workflow_call )
51+ * )
5252 echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT
5353 echo "head_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
5454 echo "run_id=${{ github.run_id }}" >> $GITHUB_OUTPUT
5555 echo "source=release" >> $GITHUB_OUTPUT
5656 echo "source_id=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
5757 ;;
58- *)
59- echo "Unknown event name: ${{ github.event_name }}"
60- exit 1
61- ;;
6258 esac
6359 - uses : ./.github/actions/create_check_status
6460 if : steps.metadata.outputs.source == 'pr'
@@ -160,7 +156,7 @@ jobs:
160156 databend-query --version
161157 databend-meta --version
162158 - name : Set github check status to pending
163- if : steps .metadata.outputs.source == 'pr'
159+ if : needs .metadata.outputs.source == 'pr'
164160 uses : ./.github/actions/create_check_status
165161 with :
166162 github_token : ${{ secrets.GITHUB_TOKEN }}
@@ -179,7 +175,7 @@ jobs:
179175 source : ${{ needs.metadata.outputs.source }}
180176 source_id : ${{ needs.metadata.outputs.source_id }}
181177 - name : Set github check status to completed
182- if : steps .metadata.outputs.source == 'pr'
178+ if : needs .metadata.outputs.source == 'pr'
183179 uses : ./.github/actions/create_check_status
184180 with :
185181 github_token : ${{ secrets.GITHUB_TOKEN }}
@@ -261,7 +257,7 @@ jobs:
261257 - uses : actions/checkout@v3
262258 - uses : ./.github/actions/setup_bendsql
263259 - name : Set github check status to pending
264- if : steps .metadata.outputs.source == 'pr'
260+ if : needs .metadata.outputs.source == 'pr'
265261 uses : ./.github/actions/create_check_status
266262 with :
267263 github_token : ${{ secrets.GITHUB_TOKEN }}
@@ -286,7 +282,7 @@ jobs:
286282 cloud_org : ${{ secrets.BENCHMARK_CLOUD_ORG }}
287283 cloud_endpoint : ${{ secrets.BENCHMARK_CLOUD_ENDPOINT }}
288284 - name : Set github check status to pending
289- if : steps .metadata.outputs.source == 'pr'
285+ if : needs .metadata.outputs.source == 'pr'
290286 uses : ./.github/actions/create_check_status
291287 with :
292288 github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments