55 paths :
66 - ' action/*'
77 - ' action.yaml'
8+ - ' .github/workflows/test.yaml'
89 branches :
910 - main
1011 pull_request :
1112 paths :
1213 - ' action/*'
1314 - ' action.yaml'
15+ - ' .github/workflows/test.yaml'
1416 workflow_dispatch :
1517
1618defaults :
2527 strategy :
2628 matrix :
2729 os : [macos-latest, windows-latest, ubuntu-latest]
28- version : ['0.8.0 ', '0.9.2 ']
30+ version : ['0.9.2 ', 'latest ']
2931 steps :
3032 - name : Checkout
3133 uses : actions/checkout@v4
3537 with :
3638 version : ${{ matrix.version }}
3739
40+ - name : Get latest SLV Version
41+ id : slv-latest
42+ run : |
43+ echo "version=$(curl -s https://api.github.com/repos/amagioss/slv/releases/latest | jq -r .tag_name)" >> $GITHUB_OUTPUT
44+
45+ - name : Show SLV Version
46+ run : |
47+ echo "SLV Version: $(slv --version | grep "SLV Version")"
3848 - name : Capture SLV Version Installed
3949 run : |
4050 echo "SLV_VERSION_INSTALLED=$(slv --version | grep "SLV Version" | awk '{print $4}')" >> $GITHUB_ENV
@@ -43,11 +53,13 @@ jobs:
4353 shell : python
4454 env :
4555 SLV_VERSION_EXPECTED : ${{ matrix.version }}
56+ SLV_LATEST_VERSION : ${{ steps.slv-latest.outputs.version }}
4657 run : |
4758 import sys, os
48- sys.exit(
49- int(not os.environ["SLV_VERSION_EXPECTED"] in os.environ["SLV_VERSION_INSTALLED"])
50- )
59+ if os.environ["SLV_VERSION_EXPECTED"] == "latest":
60+ sys.exit(0 if os.environ["SLV_VERSION_INSTALLED"] == os.environ["SLV_LATEST_VERSION"] else 1)
61+ else:
62+ sys.exit(0 if os.environ["SLV_VERSION_EXPECTED"] in os.environ["SLV_VERSION_INSTALLED"] else 1)
5163
5264 - name : Create a new SLV Environment
5365 id : new-slv-env
7183 - name : Load SLV Vault to Environment
7284 uses : ./
7385 with :
86+ version : ${{ matrix.version }}
7487 vault : pets.slv.yml
7588 env-secret-key : ${{ steps.new-slv-env.outputs.secret_key }}
7689 prefix : " MY_"
0 commit comments