Skip to content

Commit

Permalink
Use pip3 to get ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
patricia-gallardo committed Jun 30, 2021
1 parent 2573970 commit 081f404
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
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 }}'"
26 changes: 26 additions & 0 deletions README.md
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 }}"
~~~~
28 changes: 28 additions & 0 deletions action.yml
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"

0 comments on commit 081f404

Please sign in to comment.