-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
2573970
commit 081f404
Showing
3 changed files
with
77 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-18.04, ubuntu-20.04, macos-10.15, windows-2019] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get Ninja | ||
id: ninja | ||
uses: ./ # Uses an action in the root directory | ||
|
||
- name: Did we get Ninja? | ||
run: echo "Ninja version was '${{ steps.ninja.outputs.version }}'" |
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,26 @@ | ||
# Get Ninja GitHub Action | ||
|
||
Gets the most recent Ninja | ||
|
||
**Works on**: Linux, Windows and MacOS | ||
|
||
## Inputs | ||
|
||
No inputs | ||
|
||
## Outputs | ||
|
||
### `version` | ||
|
||
The version string from "ninja --version" | ||
|
||
## Example usage | ||
|
||
~~~~ | ||
- name: Install Ninja | ||
id: ninja | ||
uses: turtlesec-no/get-ninja@main | ||
- name: Ninja version | ||
run: echo "${{ steps.ninja.outputs.version }}" | ||
~~~~ |
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,28 @@ | ||
name: 'Get Ninja' | ||
description: 'Installs Ninja' | ||
author: 'TurtleSec' | ||
outputs: | ||
version: | ||
description: "The version of Ninja which was installed" | ||
value: ${{ steps.output_version.outputs.version }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install on Mac/Linux/Windows | ||
run: | | ||
pip3 install wheel setuptools | ||
pip3 install ninja --upgrade | ||
shell: bash | ||
- name: Fix path on Linux | ||
run: | | ||
echo "/home/runner/.local/bin" >> $GITHUB_PATH | ||
shell: bash | ||
- name: Fill in output variable | ||
id: output_version | ||
shell: bash | ||
run: | | ||
ninja --version | ||
echo "::set-output name=version::$(ninja --version)" | ||
branding: | ||
icon: "archive" | ||
color: "green" |