mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-29 22:20:43 +00:00
30 lines
909 B
YAML
30 lines
909 B
YAML
# .github/actions/report-status/action.yml
|
|
name: 'Report Status'
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
job_name:
|
|
description: 'The name of the job to report'
|
|
required: true
|
|
default: ''
|
|
type: string
|
|
runs-on:
|
|
description: 'Runs on'
|
|
required: true
|
|
default: 'ubuntu-latest'
|
|
type: string
|
|
jobs:
|
|
reusable-report-status:
|
|
runs-on: ${{ inputs.runs-on }}
|
|
steps:
|
|
- name: Print Job Result
|
|
run: |
|
|
echo "Job: ${{ inputs.job_name }}""
|
|
echo "${{ needs[inputs.job_name].result }}"
|
|
|
|
- name: Check Job Status
|
|
run: |
|
|
if [[ "${{ needs[inputs.job_name].result }}" == "failure" || "${{ needs[inputs.job_name].result }}" == "cancelled" ]]; then
|
|
echo "${{ needs[inputs.job_name].output }}"
|
|
exit 1
|
|
fi
|