From 519cb71ef28b745bb3a63d25528a71f092eab15a Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Sun, 20 Aug 2023 09:29:13 +0300 Subject: [PATCH] feat: run GHA build job locally with act --- .github/actions/setup-node/action.yml | 11 ++++++++--- .github/workflows/build.yml | 1 + docs/development/local-development.md | 9 +++++++++ renovate.json | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index cf33c4b9eb139a..0f3123e77482f9 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -47,9 +47,10 @@ runs: (steps.node-modules-restore.outputs.cache-hit == 'true') && 'true' || '' }}' >> "$GITHUB_ENV" - - name: Enable corepack - shell: bash - run: corepack enable + - name: Install pnpm + uses: pnpm/action-setup@v2.4.0 + with: + version: 8.6.12 - name: Setup Node uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 @@ -57,6 +58,10 @@ runs: node-version: ${{ inputs.node-version }} cache: ${{ env.CACHE_HIT != 'true' && 'pnpm' || '' }} + - name: Enable corepack + shell: bash + run: corepack enable + - name: Install dependencies uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0 if: env.CACHE_HIT != 'true' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44960a84d680ff..a7c20f08aded18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -471,6 +471,7 @@ jobs: - name: Upload uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + if: ${{ !env.ACT }} with: name: renovate-package path: renovate-0.0.0-semantic-release.tgz diff --git a/docs/development/local-development.md b/docs/development/local-development.md index c9874fbcdecd11..efe7ec75eed8bd 100644 --- a/docs/development/local-development.md +++ b/docs/development/local-development.md @@ -81,6 +81,15 @@ Then you can run `pnpm` directly from Docker, for instance: docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app renovatebot_local pnpm install ``` +## Run GitHub Action build job locally with act + +1. Install act - [installation instructions](https://github.com/nektos/act#installation) +1. Run (Pick the Large image) + +``` +act -W .github/workflows/build.yml -j build +``` + ## Fork and Clone If you want to contribute to the project, you should first "fork" the main project using the GitHub website and then clone your fork locally. diff --git a/renovate.json b/renovate.json index ce892e08223894..627b672c8aa498 100644 --- a/renovate.json +++ b/renovate.json @@ -8,6 +8,9 @@ "dockerfile": { "semanticCommitType": "build" }, + "github-actions": { + "fileMatch": [".github/actions/setup-node/action.yml"] + }, "packageRules": [ { "matchPackageNames": ["containerbase/node"],