Skip to content

feat: add fail_on_error parameter support on github actions #25

feat: add fail_on_error parameter support on github actions

feat: add fail_on_error parameter support on github actions #25

Workflow file for this run

name: Commitlint
on:
push:
branches: ["main", "fail_on_error"]
pull_request:
jobs:
commitlint:
runs-on: ubuntu-latest
name: Commitlint
steps:
- uses: actions/checkout@v4
- name: Run commitlint
id: commitlintrun
uses: ./ # Uses an action in the root directory
# or use a released GitHub Action
# uses: opensource-nepal/[email protected]
with:
fail_on_error: false
- name: Check Output
run: |
echo 'Status - ${{ steps.commitlintrun.outputs.status }}'
echo 'Exit Code - ${{ steps.commitlintrun.outputs.exit_code }}'
# Check if commitlintrun status is equal to "failure"
if [ "${{ steps.commitlintrun.outputs.status }}" = "failure" ]; then
echo "Failing the job manually because Commitlint status is failure."
exit 1 # This line manually fails the job
fi