Skip to content

Commit df47363

Browse files
Enhance workflow with actionlint_config input
1 parent 26f3c8d commit df47363

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/__call-common-lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
- reopened
1818
workflow_call:
1919
inputs:
20+
actionlint_config:
21+
required: false
22+
type: string
2023
runner:
2124
required: false
2225
type: string
@@ -113,10 +116,15 @@ jobs:
113116
- name: Install actionlint
114117
id: get_actionlint
115118
shell: bash
119+
env:
120+
ACTIONLINT_CONFIG: ${{ inputs.actionlint_config }}
116121
run: |
117122
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
118123
119-
if [ ! -f ".github/actionlint.yml" ]; then
124+
if [ -n "${ACTIONLINT_CONFIG}" ]; then
125+
mkdir -p .github
126+
printf "%s\n" "${ACTIONLINT_CONFIG}" > .github/actionlint.yml
127+
elif [ ! -f ".github/actionlint.yml" ]; then
120128
curl \
121129
-fsSL \
122130
--retry 3 \

0 commit comments

Comments
 (0)