Skip to content

Commit

Permalink
Add support for windows path sep
Browse files Browse the repository at this point in the history
Signed-off-by: Y. Meyer-Norwood <[email protected]>
  • Loading branch information
norwd authored Nov 7, 2024
1 parent ded2718 commit 382bb09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ runs:
- name: "Configure yamlfmt"
shell: bash
env:
CONFIG_FILE: '${{ runner.temp }}/yamlfmt.conf'
run: |
cat << ${{ steps.config.outputs.delimiter }} | awk 'NF>0' | tee ${CONFIG_FILE}
cat << ${{ steps.config.outputs.delimiter }} | awk 'NF>0' | tee "${CONFIG_FILE}"
${{ steps.config.outputs.include-files && 'include:
- '|| '' }}${{ join(fromJSON(steps.config.outputs.include-files), '
- ') || '' }}
Expand All @@ -163,6 +161,8 @@ runs:
retain_line_breaks: ${{ inputs.keep-line-breaks }}
disallow_anchors: ${{ inputs.disallow-anchors }}
${{ steps.config.outputs.delimiter }}
env:
CONFIG_FILE: ${{ format('{0}{1}yamlfmt.conf', runner.temp, contains(runner.temp, '\') && '\' || '/') }}

- name: "Checkout"
uses: actions/[email protected]
Expand All @@ -186,7 +186,7 @@ runs:
shell: bash
run: ~/go/bin/yamlfmt -conf "${CONFIG_FILE}"
env:
CONFIG_FILE: '${{ runner.temp }}/yamlfmt.conf'
CONFIG_FILE: ${{ format('{0}{1}yamlfmt.conf', runner.temp, contains(runner.temp, '\') && '\' || '/') }}

- name: "Setup GPG Keys"
if: inputs.signing-private-key != ''
Expand Down

0 comments on commit 382bb09

Please sign in to comment.