Skip to content

Commit 9b8484b

Browse files
authored
Merge pull request #44 from apache/fatal
NR: Add support for --fatal option Tested against local copies of OOO, Infra and apache websites
2 parents 2ef607c + 328dce0 commit 9b8484b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/pelican-action-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
with:
4040
destination: ${{ env.TARGET }}
4141
gfm: 'true'
42+
# fatal: 'errors' (default)
4243
env:
4344
UNIT_TEST_A: This is UNIT_TEST_A
4445
- name: Check ${{ env.TARGET }} was created
@@ -64,6 +65,7 @@ jobs:
6465
with:
6566
destination: ${{ env.TARGET }}
6667
gfm: 'true'
68+
fatal: 'warnings'
6769
env: # This is a different value
6870
UNIT_TEST_A: This is UNIT_TEST_A updated
6971
- name: Check ${{ env.TARGET }} is present and has been updated
@@ -86,6 +88,7 @@ jobs:
8688
with:
8789
destination: ${{ env.TARGET }}
8890
gfm: 'true'
91+
fatal: '' # should ignore it
8992
env: # This is the same value
9093
UNIT_TEST_A: This is UNIT_TEST_A updated
9194
- name: Check ${{ env.TARGET }} is present and has not been updated

pelican/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ inputs:
2525
description: "Pelican Version (default 4.5.4)"
2626
required: false
2727
default: '4.5.4'
28+
fatal:
29+
description: "Value for --fatal option [errors|warnings] - sets exit code to error (default: errors)"
30+
required: false
31+
default: 'errors'
2832
runs:
2933
using: "composite"
3034
steps:
@@ -74,8 +78,13 @@ runs:
7478
else
7579
OPTS=''
7680
fi
81+
if [ -n "${{ inputs.fatal }}" ]
82+
then
83+
OPTS="$OPTS --fatal ${{ inputs.fatal }}"
84+
fi
7785
echo "Getting plugins from action location: ${{ github.action_path }}"
7886
PP=$(python3 ${{ github.action_path }}/plugin_paths.py '${{ github.action_path }}/plugins')
87+
set -x # Show the expanded variables
7988
python3 -B -m pelican content -e "$PP" -o ${{ inputs.tempdir }} $OPTS
8089
8190
- name: Check out previous branch

0 commit comments

Comments
 (0)