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 Oct 16, 2023
1 parent 99795e5 commit 519cb71
Show file tree
Hide file tree
Showing 4 changed files with 21 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@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
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 @@ -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
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
3 changes: 3 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"dockerfile": {
"semanticCommitType": "build"
},
"github-actions": {
"fileMatch": [".github/actions/setup-node/action.yml"]
},
"packageRules": [
{
"matchPackageNames": ["containerbase/node"],
Expand Down

0 comments on commit 519cb71

Please sign in to comment.