Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone nodejs/node in workflow and copy to build context #190

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:

env:
DISTRO: ${{ inputs.distro || 'alpine' }}
ARCH: ${{ inputs.arch || 'aarch64' }}
ARCH: ${{ inputs.arch || 'armv6hf' }}
NODE_VERSION: ${{ inputs.node-version || '19.6.1' }}
BUCKET_NAME: ${{ vars.BUCKET_NAME || 'resin-packages' }}

Expand Down Expand Up @@ -90,9 +90,18 @@ jobs:

steps:
# https://github.com/actions/checkout
- name: Checkout
- name: Checkout node-arm
uses: actions/[email protected]

# https://github.com/actions/checkout
- name: Checkout nodejs/node
uses: actions/[email protected]
with:
repository: nodejs/node
ref: v${{ env.NODE_VERSION }}
fetch-depth: 1
path: node

# https://github.com/aws-actions/configure-aws-credentials
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV BUILD_FLAGS='--prefix=/'
ENV DEST_DIR=node-v${NODE_VERSION}-linux-${BALENA_ARCH}
ENV TAR_FILE=node-v${NODE_VERSION}-linux-${BALENA_ARCH}.tar.gz

FROM balenalib/${BALENALIB_ARCH}-alpine:3.18-build AS alpine
FROM balenalib/${BALENALIB_ARCH}-alpine:3.14-build AS alpine

ARG BALENA_ARCH=%%BALENA_ARCH%%
ENV BUILD_FLAGS='--prefix=/ --shared-zlib'
Expand All @@ -21,10 +21,10 @@ FROM ${DISTRO} AS build

WORKDIR /src

RUN git clone https://github.com/nodejs/node.git .
COPY node/ ./
COPY commit-table ./commit-table

ARG NODE_VERSION
COPY commit-table ./commit-table

RUN commit="$(awk -v version="v${NODE_VERSION}" '$2 == version {print $1}' commit-table)" && \
if [ -z "${commit}" ]; then echo "commit for v$NODE_VERSION not found!" ; exit 1 ; fi && \
Expand Down
Loading