Skip to content

try github context path ref #19

try github context path ref

try github context path ref #19

Workflow file for this run

name: Test Action
on:
pull_request:
jobs:
test:
name: Test Action
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- id: sver-version
name: sver version
uses: ./
with:
command: version
- run: |
# test sver-version
if ! [[ '${{ steps.sver-version.outputs.output }}' =~ ^v[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]* ]] ; then
echo '::error title=Action returned invalid response::The action' \
'/action.yaml returned an invalid response' \
'(${{ steps.sver-version.outputs.output }})'
exit 1
fi
- id: sver-max
name: sver max
uses: ./
with:
command: max
input-command: git tag -l
- run: |
# test sver-max
if ! [[ '${{ steps.sver-max.outputs.output }}' =~ ^v[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]* ]] ; then
echo '::error title=Action returned invalid response::The action' \
'/action.yaml returned an invalid response' \
'(${{ steps.sver-max.outputs.output }})'
exit 1
fi
- id: sver-equals-true
name: sver equals (true)
uses: ./
with:
command: equals v1.2.3 v1.2.3+build-is-ignored
- run: |
# test sver-equals-true
if [ '${{ steps.sver-equals-true.outputs.output }}' != 'true' ] ; then
echo '::error title=Action returned invalid response::The action' \
'/action.yaml returned an invalid response' \
'(${{ steps.sver-equals-true.outputs.output }})'
exit 1
fi
- id: sver-equals-false
name: sver equals (false)
uses: ./
with:
command: equals v1.2.3 v1.2.3-pre.is.not.ignored
- run: |
# test sver-equals-false
if [ '${{ steps.sver-equals-false.outputs.output }}' != 'false' ] ; then
echo '::error title=Action returned invalid response::The action' \
'/action.yaml returned an invalid response' \
'(${{ steps.sver-equals-false.outputs.output }})'
exit 1
fi