Skip to content

Commit

Permalink
#9 Added multiline values into exclude option
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Epatko committed Mar 10, 2024
1 parent e7906f4 commit e130915
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -20,9 +20,6 @@ jobs:
dir: .
since: 2000-01-01
output_dir: output-dir
exclude: |-
.gitignore
LICENSE
- uses: peaceiris/actions-gh-pages@v3.9.3
with:
publish_dir: output-dir
Expand Down
11 changes: 7 additions & 4 deletions README.md
Expand Up @@ -30,10 +30,13 @@ jobs:
since: 2000-01-01 # Default value: '2000-01-01'.
before: 2024-03-03' # Default value: now day.
dir: . # Default value: include all files in the current directory.
exclude: |- # We can use multiline strings if we want something close to multiline values.
dir1/** ## It's an important detail that we used '|-' in the YAML and not '|'.
dir2/**/* ## There is no default value for exclude option.
dir3/file.txt
# For exclude option we can use multiline strings if we want to pass multiple values.
# In this case it's an important detail that we used '|' or '|-' in the YAML.
# There is no default value for exclude option.
exclude: |
dir1/**
dir2/**/*
dir3/file.txt
output_dir: ./output # Default value: './output'.
filename: hoc-badge.svg # Default value: 'hoc-badge.svg'.
```
Expand Down
22 changes: 11 additions & 11 deletions action.yml
Expand Up @@ -40,18 +40,18 @@ runs:
gem install hoc
pip install anybadge
$GITHUB_ACTION_PATH/generate-badge.sh \
-b $BEFORE \
-d $DIR \
-s $SINCE \
-o $OUTPUT_DIR \
-f $FILENAME \
-e "$EXCLUDE"
-b "$BEFORE" \
-d "$DIR" \
-s "$SINCE" \
-o "$OUTPUT_DIR" \
-f "$FILENAME" \
-e "$EXCLUDE"
shell: bash
env:
BEFORE: ${{ inputs.before }}
DIR: ${{ inputs.dir }}
EXCLUDE: ${{ inputs.exclude }}
SINCE: ${{ inputs.since }}
OUTPUT_DIR: ${{ inputs.output_dir }}
BEFORE: ${{ inputs.before }}
DIR: ${{ inputs.dir }}
EXCLUDE: ${{ inputs.exclude }}
SINCE: ${{ inputs.since }}
OUTPUT_DIR: ${{ inputs.output_dir }}
FILENAME: ${{ inputs.filename }}

0 comments on commit e130915

Please sign in to comment.