Skip to content

Commit

Permalink
Merge pull request #17 from 417-72KI/support-specifying-dangerfile-path
Browse files Browse the repository at this point in the history
Support specifying `Dangerfile.swift` path
  • Loading branch information
417-72KI authored Sep 22, 2021
2 parents f0bb532 + 10fd125 commit 68cb278
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: 'GitHub Action for Danger-Swift + SwiftLint'
description: 'Runs Danger-Swift with SwiftLint'
author: '417-72KI <417_72ki@gmail.com>'
inputs:
dangerfile:
description: 'Path of Dangerfile.swift, if it is not in repo's root.'
required: false
runs:
using: 'docker'
image: 'docker://41772ki/danger-swiftlint:5.4'
Expand Down
10 changes: 8 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

if [ $# -lt 1 ]; then
echo -e "\e[31mUsage: $0 [cmd]\e[m"
Expand All @@ -7,4 +7,10 @@ fi

show-versions

danger-swift $@
if [[ "${INPUT_DANGERFILE}" == '' ]]; then
DANGERFILE_ARGS=''
else
DANGERFILE_ARGS="--dangerfile ${INPUT_DANGERFILE}"
fi

danger-swift $@ $DANGERFILE_ARGS

0 comments on commit 68cb278

Please sign in to comment.