Skip to content

Commit

Permalink
Split pandoc install into another script
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Dec 19, 2024
1 parent c79a14c commit edbd9c0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release.sh text eol=lf
*.sh text eol=lf
5 changes: 1 addition & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ inputs:
runs:
using: composite
steps:
- run: |
if [[ -n "$WOWI_API_TOKEN" && "${{ github.ref }}" == "refs/tags/"* && "${{ inputs.pandoc }}" == "true" ]] && ! hash pandoc &>/dev/null; then
sudo apt-get install -yq pandoc &>/dev/null && echo -e "##[group]Install pandoc\\n[command]pandoc --version\\n$( pandoc --version )\\n##[endgroup]"
fi
- run: INPUT_PANDOC=${{ inputs.pandoc }} $GITHUB_ACTION_PATH/setup-packager.sh
shell: bash
- run: $GITHUB_ACTION_PATH/release.sh ${{ inputs.args }}
shell: bash
14 changes: 14 additions & 0 deletions setup-packager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Install pandoc for WoWI changelog output ([md -> html] -> bbcode)
install_pandoc() {
command -v pandoc &>/dev/null && return 0

if [[ -n "$WOWI_API_TOKEN" && "$GITHUB_REF" == "refs/tags/"* && "$INPUT_PANDOC" == "true" ]]; then
sudo apt-get install -yq pandoc &>/dev/null && echo -e "##[group]Install pandoc\\n[command]pandoc --version\\n$( pandoc --version )\\n##[endgroup]"
fi
}

if [[ -n $GITHUB_ACTIONS ]]; then
install_pandoc
fi

0 comments on commit edbd9c0

Please sign in to comment.