fix: only default to -U
if there is not a version
in the config [APE-1180]
#13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ape Version Test | |
on: | |
push: | |
branches: [main] | |
tags-ignore: ['**'] | |
paths-ignore: ['**.md'] | |
pull_request: | |
paths-ignore: ['**.md'] | |
concurrency: | |
group: ${{ github.ref }}-version | |
cancel-in-progress: true | |
jobs: | |
run-this-action: | |
name: Run action (${{ matrix.version }}) | |
runs-on: [ubuntu-latest] | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
[ | |
'default', | |
'0.6.11', | |
'==0.6.11', | |
'git+https://github.com/ApeWorX/ape.git@main', | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check version pin | |
id: check-version | |
run: | | |
if [[ ${{ matrix.version }} == "default" ]]; then | |
echo "ape-version=''" >> $GITHUB_OUTPUT | |
else | |
echo "ape-version=${{ matrix.version }}" >> $GITHUB_OUTPUT | |
fi | |
- name: Run ape action | |
id: ape-action | |
uses: ./ | |
with: | |
ape-version-pin: ${{ steps.check-version.outputs.ape-version }} | |
- run: ape --help | |
- name: Print outputs | |
run: | | |
echo "Output: ${{ steps.ape-action.outputs.ape-version }}" |