From 2aa19416650d5a8379f7132c28081462ed34a3a3 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Tue, 2 Aug 2022 15:17:53 -0400 Subject: [PATCH] Support nektos/act for debugging GitHub Actions --- .github/workflows/ci.yaml | 4 +++- bin/before_install | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 bin/before_install diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 79dc41ef3..6951e8970 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,11 +16,13 @@ jobs: - '14' steps: - uses: actions/checkout@v2 + - name: Set up system + run: bin/before_install - name: Set up Node uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - cache: yarn + cache: ${{ !env.ACT && 'yarn' || '' }} registry-url: https://npm.manageiq.org/ - name: Prepare tests run: bin/setup diff --git a/bin/before_install b/bin/before_install new file mode 100755 index 000000000..aac98da9d --- /dev/null +++ b/bin/before_install @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -n "$ACT" ]; then + # Install yarn + curl -o- -L https://yarnpkg.com/install.sh | bash + echo "$HOME/.yarn/bin" >> $GITHUB_PATH + echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH +fi