Skip to content

Commit

Permalink
feat: run GHA build job locally with act
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Aug 26, 2023
1 parent 5dbc928 commit 2324171
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,21 @@ 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/[email protected]
with:
version: 8.6.12

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
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@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3
if: env.CACHE_HIT != 'true'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ jobs:

- name: Upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ !env.ACT }}
with:
name: renovate-package
path: renovate-0.0.0-semantic-release.tgz
Expand Down
9 changes: 9 additions & 0 deletions docs/development/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2324171

Please sign in to comment.