-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: "Setup GitHub Actions" | ||
subtitle: "Setup GitHub Actions for Continuous Integration" | ||
weight: 5 | ||
draft: false | ||
description: > | ||
A tutorial on how to set up Score with GitHub Actions. | ||
--- | ||
|
||
You can use any Score implementation CLI in your GitHub Action workflows, for example, when you make a code change, and you want the Humanitec Platform Orchestrator to deploy your code to a new environment. | ||
|
||
The following is a guide to setting up the Score implementation CLI in your GitHub Action workflows. | ||
|
||
For the Score GitHub Action, see [Setup Score](https://github.com/score-spec/setup-score) | ||
|
||
## Usage | ||
|
||
To use the Score GitHub Action, add the following step to your [workflow](https://docs.github.com/en/actions/using-workflows/about-workflows): | ||
|
||
```yaml | ||
steps: | ||
- uses: score-spec/setup-score@v2 | ||
with: | ||
file: score-compose | ||
version: '0.6.0' | ||
- run: score-compose --version | ||
``` | ||
This will download and cache the specified version of the `score-compose` CLI and add it to PATH. | ||
|
||
The action accepts the following inputs: | ||
|
||
- `file` - The Score CLI tool to install. For example, `score-humanitec`, `score-compose`, or `score-helm`. | ||
- `version` - The version of the CLI to install. | ||
|
||
## Example | ||
|
||
Here is a complete example workflow: | ||
|
||
```yaml | ||
name: Score Example | ||
on: push | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: score-spec/setup-score@v2 | ||
with: | ||
file: score-compose | ||
version: '0.6.0' | ||
- run: score-compose --version | ||
``` | ||
|
||
This installs version `0.6.0` of `score-compose`, adds it to `$PATH`, and runs `score-compose --version` to verify it is set up correctly. | ||
|
||
The action caches the Score binary, so it won't need to download it each run. |