Skip to content

Commit

Permalink
Added latest version tag support (#4)
Browse files Browse the repository at this point in the history
* Added latest version tag support
---------

Signed-off-by: Eugene Y <[email protected]>
  • Loading branch information
ghen authored Aug 16, 2023
1 parent 8262058 commit 5fa5ca5
Show file tree
Hide file tree
Showing 7 changed files with 10,768 additions and 6,336 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
version: [0.6.0]
version: [0.6.0, latest]

steps:
- name: Checkout
Expand All @@ -29,18 +29,21 @@ jobs:
with:
file: score-compose
version: ${{ matrix.version }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup score-humanitec
uses: ./
with:
file: score-humanitec
version: ${{ matrix.version }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup score-helm
uses: ./
with:
file: score-helm
version: ${{ matrix.version }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Verify installation
run: |
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ steps:
- uses: score-spec/setup-score@v2
with:
file: score-humanitec
version: '0.6.0'
version: latest
token: ${{ secrets.GITHUB_TOKEN }}
- run: score-humanitec --version
```
> **Note:** `token` should be set when the `latest` version is used. It is required by the action to pull the latest release details via GitHub API, and the token provided should [have contents: read](https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#contents) permission to fetch data from the `GitHub.com`.
7 changes: 5 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ inputs:
description: 'The Score CLI tool to install: score-compose, score-humanitec, or score-helm.'
required: true
version:
description: 'The Score version to download and use. Supports semver spec and ranges.'
description: 'The Score version to download and use. Use the `latest` to fetch the most recent stable release version automatically.'
required: true
token:
description: 'An authentication token (usually a GITHUB_TOKEN) authorised to fetch data from the `GitHub.com`. Only required if `version` is set to `latest`'
required: false
runs:
using: 'node16'
main: 'dist/index.js'
main: 'dist/index.js'
Loading

0 comments on commit 5fa5ca5

Please sign in to comment.