mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
22 lines
541 B
YAML
22 lines
541 B
YAML
name: Run Make Rule
|
|
description: Runs a specified Makefile rule
|
|
inputs:
|
|
rule:
|
|
description: The Makefile rule to run
|
|
required: true
|
|
default: build
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- run: |
|
|
awk -v rule_name="${RULE_NAME}" '
|
|
$0 ~ rule_name":" { in_rule = 1; next }
|
|
in_rule && /^\t/ { print $0 }
|
|
in_rule && !/^\t/ { in_rule = 0 }
|
|
' Makefile | while IFS= read -r command; do
|
|
eval "$command"
|
|
done
|
|
shell: bash
|
|
env:
|
|
RULE_NAME: ${{ inputs.rule }}
|