Skip to content

Merge pull request #6 from direct-actions/dev #93

Merge pull request #6 from direct-actions/dev

Merge pull request #6 from direct-actions/dev #93

Workflow file for this run

name: Tests
on:
push:
jobs:
test_action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: test-1
name: Test 1
uses: ./
with:
arg: 'bob: yep'
filter: '"howdy: \($bob)"'
indent: 4
input: '{ "hi": "mom" }'
raw-output: true
sort-keys: true
- run: |
# Display Test 1 Output
cat <<<'${{ steps.test-1.outputs.output }}'
if ${{ steps.test-1.outputs.output == '' && 'true' || 'false' }} ; then
echo 'error::No output detected from jq action'
fi
- id: test-2
name: Test 2
uses: ./
with:
args: a b c
filter: '"\($ARGS.positional[0]), \($ARGS.positional[1]), \($ARGS.positional[2])"'
input-yaml: |
a: b
c: d
null-input: true
- run: |
# Display Test 2 Output
cat <<<'${{ steps.test-2.outputs.output }}'
if ${{ steps.test-2.outputs.output == '' && 'true' || 'false' }} ; then
echo 'error::No output detected from jq action'
fi
- id: test-3
name: Test 3
uses: ./
with:
filter: '{ files: split("\n") }'
input-command: ls /
raw-input: true
slurp: true
- run: |
# Display Test 3 Output
cat <<<'${{ steps.test-3.outputs.output }}'
if ${{ steps.test-3.outputs.output == '' && 'true' || 'false' }} ; then
echo 'error::No output detected from jq action'
fi