Skip to content

Commit

Permalink
Use local actions
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
  • Loading branch information
alexandrebodin committed Oct 14, 2020
1 parent f132bc1 commit 8b4cd8d
Show file tree
Hide file tree
Showing 3 changed files with 306 additions and 299 deletions.
12 changes: 12 additions & 0 deletions .github/actions/install-modules/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Install modules'
description: 'run yarn install and add global modules'
inputs:
globalPackages:
description: 'global packages to install'
runs:
using: 'composite'
steps:
- run: $GITHUB_ACTION_PATH/script.sh
env:
GLOBAL_PACKAGES: ${{ inputs.globalPackages }}
shell: bash
8 changes: 8 additions & 0 deletions .github/actions/install-modules/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# install global packages if set
if [[ -n "$GLOBAL_PACKAGES" ]]; then
yarn global add "$GLOBAL_PACKAGES"
echo "$(yarn global bin)" >>$GITHUB_PATH
fi

# run yarn
yarn

0 comments on commit 8b4cd8d

Please sign in to comment.