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 25, 2023
1 parent 69f7240 commit d583fb7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"name": "Renovate",
"dockerFile": "Dockerfile",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {}
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2.3.1": {},
"ghcr.io/devcontainers-contrib/features/act:1.0.12": {
"version": "0.2.49"
}
},
"capAdd": ["SYS_PTRACE"],
"privileged": true,
Expand Down
13 changes: 9 additions & 4 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is the composite action:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
# https://docs.github.com/en/actionxs/creating-actions/creating-a-composite-action
#
# Composite actions have some limitations:
# - many contexts are unavailable, e.g. `runner`
Expand Down 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/action-setup@v2.4.0
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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ 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

0 comments on commit d583fb7

Please sign in to comment.