From ff0000f8e4f169a5b8d292d52c54adc1e1afa85f Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Fri, 24 Mar 2023 13:17:34 -0700 Subject: [PATCH] Add simple way to install autobuild git ref 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. --- .github/workflows/test.yaml | 6 ++++++ README.md | 4 +++- action.yaml | 7 ++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7ee4fcb..a973c59 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,3 +38,9 @@ jobs: with: checkout: false file: autobuild-scm.xml + + # Test git-based autobuild install + - uses: ./ + with: + version: main + checkout: false diff --git a/README.md b/README.md index 86d9ac5..638c26c 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/action.yaml b/action.yaml index 28c4f2c..35f24df 100644 --- a/action.yaml +++ b/action.yaml @@ -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' }}