Skip to content

Commit

Permalink
Add simple way to install autobuild git ref
Browse files Browse the repository at this point in the history
If version is not a semver then assume it's a git ref which can be used
to install autobuild from its canonical repository. This will make
testing CI/CD with in-development autobuild changes easier.
  • Loading branch information
bennettgoble committed Mar 24, 2023
1 parent 313f520 commit ff0000f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ jobs:
with:
checkout: false
file: autobuild-scm.xml

# Test git-based autobuild install
- uses: ./
with:
version: main
checkout: false
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
os: [windows-2019, macos-11, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: secondlife/autobuild@v1
- uses: secondlife/action-autobuild@v3
with:
autobuild-version: 3.9.0 # PyPI version or git ref
```
For a full list of available action inputs see [action.yaml](action.yaml).
7 changes: 6 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ runs:
env:
VERSION: ${{ inputs.autobuild-version }}
if: inputs.setup-autobuild
run: pip install autobuild==$VERSION
run: |
if [[ $VERSION = *.*.* ]]; then
pip install autobuild==$VERSION
else
pip install "autobuild @ git+https://github.com/secondlife/autobuild@$VERSION"
fi
- name: Setup cygwin
if: ${{ runner.os == 'Windows' }}
Expand Down

0 comments on commit ff0000f

Please sign in to comment.