Skip to content

Commit eabe5a2

Browse files
authored
build: Release (#2605)
2 parents eb95460 + 32a79e5 commit eabe5a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+19569
-11679
lines changed

Diff for: .github/workflows/ci-automated-check-environment.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout default branch
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
- name: Setup Node
18-
uses: actions/setup-node@v2
18+
uses: actions/setup-node@v4
1919
with:
20-
node-version: 14
20+
node-version: 18
2121
- name: Cache Node.js modules
22-
uses: actions/cache@v2
22+
uses: actions/cache@v4
2323
with:
2424
path: ~/.npm
2525
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Checkout default branch
39-
uses: actions/checkout@v2
39+
uses: actions/checkout@v4
4040
- name: Compose branch name for PR
4141
id: branch
4242
run: echo "::set-output name=name::ci-bump-environment"

Diff for: .github/workflows/ci.yml

+38-31
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ on:
66
branches:
77
- '**'
88
env:
9-
NODE_VERSION: 18.9.0
9+
NODE_VERSION: 20.11.1
1010
jobs:
1111
check-ci:
1212
name: Node Engine Check
1313
timeout-minutes: 15
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Use Node.js ${{ env.NODE_VERSION }}
18-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: ${{ env.NODE_VERSION }}
2121
- name: Cache Node.js modules
22-
uses: actions/cache@v2
22+
uses: actions/cache@v4
2323
with:
2424
path: ~/.npm
2525
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
@@ -34,13 +34,13 @@ jobs:
3434
timeout-minutes: 15
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3838
- name: Use Node.js ${{ env.NODE_VERSION }}
39-
uses: actions/setup-node@v1
39+
uses: actions/setup-node@v4
4040
with:
4141
node-version: ${{ env.NODE_VERSION }}
4242
- name: Cache Node.js modules
43-
uses: actions/cache@v2
43+
uses: actions/cache@v4
4444
with:
4545
path: ~/.npm
4646
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
@@ -54,13 +54,13 @@ jobs:
5454
timeout-minutes: 15
5555
runs-on: ubuntu-latest
5656
steps:
57-
- uses: actions/checkout@v2
57+
- uses: actions/checkout@v4
5858
- name: Use Node.js ${{ env.NODE_VERSION }}
59-
uses: actions/setup-node@v1
59+
uses: actions/setup-node@v4
6060
with:
6161
node-version: ${{ env.NODE_VERSION }}
6262
- name: Cache Node.js modules
63-
uses: actions/cache@v2
63+
uses: actions/cache@v4
6464
with:
6565
path: ~/.npm
6666
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
@@ -76,47 +76,54 @@ jobs:
7676
include:
7777
- name: Docker linux/amd64
7878
DOCKER_PLATFORM: linux/amd64
79-
# Building currently fails for the platforms below
80-
# - name: Docker linux/arm/v6
81-
# DOCKER_PLATFORM: linux/arm/v6
82-
# - name: Docker linux/arm/v7
83-
# DOCKER_PLATFORM: linux/arm/v7
79+
RUNNER_TYPE: ubuntu-latest
8480
# - name: Docker linux/arm64/v8
8581
# DOCKER_PLATFORM: linux/arm64/v8
82+
# # Replace this with a native arm linux runner when available, presumably by EOY 2024, see:
83+
# # https://github.com/orgs/community/discussions/19197#discussioncomment-10550689
84+
# # The conditional setup of QEMU may need to be adapted to not run on native arm,
85+
# # which will speed up the build process for arm64/v8 since no emulation will be needed.
86+
# RUNNER_TYPE: ubuntu-latest
8687
fail-fast: false
8788
name: ${{ matrix.name }}
88-
timeout-minutes: 15
89-
runs-on: ubuntu-latest
89+
timeout-minutes: 45
90+
runs-on: ${{ matrix.RUNNER_TYPE }}
9091
steps:
91-
- uses: actions/checkout@v2
92+
- uses: actions/checkout@v4
9293
- name: Set up QEMU
93-
uses: docker/setup-qemu-action@v1
94+
uses: docker/setup-qemu-action@v2
95+
# Only set up QEMU if not running on native arm
96+
if: ${{ matrix.DOCKER_PLATFORM != 'linux/amd64' && matrix.RUNNER_TYPE == 'ubuntu-latest' }}
9497
- name: Set up Docker Buildx
95-
uses: docker/setup-buildx-action@v1
98+
uses: docker/setup-buildx-action@v2
99+
with:
100+
install: true
96101
- name: Build docker image
97-
uses: docker/build-push-action@v2
102+
uses: docker/build-push-action@v3
98103
with:
99104
platforms: ${{ matrix.DOCKER_PLATFORM }}
105+
cache-from: type=gha
106+
cache-to: type=gha,mode=max
100107
check-lock-file-version:
101108
name: NPM Lock File Version
102109
timeout-minutes: 5
103110
runs-on: ubuntu-latest
104111
steps:
105-
- uses: actions/checkout@v2
112+
- uses: actions/checkout@v4
106113
- name: Check NPM lock file version
107114
uses: mansona/npm-lockfile-version@v1
108115
with:
109-
version: 1
116+
version: 3
110117
check-build:
111118
strategy:
112119
matrix:
113120
include:
114-
- name: Node 14
115-
NODE_VERSION: 14.20.1
116-
- name: Node 16
117-
NODE_VERSION: 16.17.0
118121
- name: Node 18
119-
NODE_VERSION: 18.9.0
122+
NODE_VERSION: 18.20.4
123+
- name: Node 20
124+
NODE_VERSION: 20.18.0
125+
- name: Node 22
126+
NODE_VERSION: 22.9.0
120127
fail-fast: false
121128
name: ${{ matrix.name }}
122129
timeout-minutes: 15
@@ -131,13 +138,13 @@ jobs:
131138
echo "::set-output name=node_major::$(echo $node_major)"
132139
- name: Fix usage of insecure GitHub protocol
133140
run: sudo git config --system url."https://github".insteadOf "git://github"
134-
- uses: actions/checkout@v2
141+
- uses: actions/checkout@v4
135142
- name: Use Node.js ${{ matrix.NODE_VERSION }}
136-
uses: actions/setup-node@v1
143+
uses: actions/setup-node@v4
137144
with:
138145
node-version: ${{ matrix.NODE_VERSION }}
139146
- name: Cache Node.js modules
140-
uses: actions/cache@v2
147+
uses: actions/cache@v4
141148
with:
142149
path: ~/.npm
143150
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}

Diff for: .github/workflows/release-automated.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
persist-credentials: false
1414
- uses: actions/setup-node@v2
1515
with:
16-
node-version: 14
16+
node-version: 18
1717
registry-url: https://registry.npmjs.org/
1818
- name: Cache Node.js modules
1919
uses: actions/cache@v2
@@ -39,6 +39,7 @@ jobs:
3939
REGISTRY: docker.io
4040
IMAGE_NAME: parseplatform/parse-dashboard
4141
runs-on: ubuntu-latest
42+
timeout-minutes: 60
4243
permissions:
4344
contents: read
4445
packages: write
@@ -52,29 +53,33 @@ jobs:
5253
ref: ${{ needs.release.outputs.current_tag }}
5354
- name: Set up QEMU
5455
id: qemu
55-
uses: docker/setup-qemu-action@v1
56+
uses: docker/setup-qemu-action@v2
5657
- name: Set up Docker Buildx
57-
uses: docker/setup-buildx-action@v1
58+
uses: docker/setup-buildx-action@v2
59+
with:
60+
install: true
5861
- name: Log into Docker Hub
5962
if: github.event_name != 'pull_request'
60-
uses: docker/login-action@v1
63+
uses: docker/login-action@v2
6164
with:
6265
username: ${{ secrets.DOCKERHUB_USERNAME }}
6366
password: ${{ secrets.DOCKERHUB_TOKEN }}
6467
- name: Extract Docker metadata
6568
id: meta
66-
uses: docker/metadata-action@v3
69+
uses: docker/metadata-action@v4
6770
with:
6871
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6972
flavor: |
7073
latest=${{ steps.branch.outputs.branch_name == 'release' }}
7174
tags: |
7275
type=semver,pattern={{version}},value=${{ needs.release.outputs.current_tag }}
7376
- name: Build and push Docker image
74-
uses: docker/build-push-action@v2
77+
uses: docker/build-push-action@v3
7578
with:
7679
context: .
77-
platforms: linux/amd64
80+
platforms: linux/amd64, linux/arm64/v8
81+
cache-from: type=gha
82+
cache-to: type=gha,mode=max
7883
push: ${{ github.event_name != 'pull_request' }}
7984
tags: ${{ steps.meta.outputs.tags }}
8085
labels: ${{ steps.meta.outputs.labels }}

Diff for: .github/workflows/release-manual-docker.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 60
1819
permissions:
1920
contents: read
2021
packages: write
@@ -28,18 +29,20 @@ jobs:
2829
ref: ${{ github.event.inputs.ref }}
2930
- name: Set up QEMU
3031
id: qemu
31-
uses: docker/setup-qemu-action@v1
32+
uses: docker/setup-qemu-action@v2
3233
- name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@v1
34+
uses: docker/setup-buildx-action@v2
35+
with:
36+
install: true
3437
- name: Log into Docker Hub
3538
if: github.event_name != 'pull_request'
36-
uses: docker/login-action@v1
39+
uses: docker/login-action@v2
3740
with:
3841
username: ${{ secrets.DOCKERHUB_USERNAME }}
3942
password: ${{ secrets.DOCKERHUB_TOKEN }}
4043
- name: Extract Docker metadata
4144
id: meta
42-
uses: docker/metadata-action@v3
45+
uses: docker/metadata-action@v4
4346
with:
4447
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4548
flavor: |
@@ -48,10 +51,12 @@ jobs:
4851
type=semver,enable=true,pattern={{version}},value=${{ github.event.inputs.ref }}
4952
type=raw,enable=${{ github.event.inputs.ref == '' }},value=latest
5053
- name: Build and push Docker image
51-
uses: docker/build-push-action@v2
54+
uses: docker/build-push-action@v3
5255
with:
5356
context: .
54-
platforms: linux/amd64
57+
platforms: linux/amd64, linux/arm64/v8
58+
cache-from: type=gha
59+
cache-to: type=gha,mode=max
5560
push: ${{ github.event_name != 'pull_request' }}
5661
tags: ${{ steps.meta.outputs.tags }}
5762
labels: ${{ steps.meta.outputs.labels }}

Diff for: Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
############################################################
22
# Build stage
33
############################################################
4-
FROM node:lts-alpine AS build
4+
FROM node:20.17.0-alpine3.20 AS build
55

66
RUN apk --no-cache add git
77
WORKDIR /src
@@ -27,7 +27,7 @@ RUN npm run prepare && npm run build
2727
############################################################
2828
# Release stage
2929
############################################################
30-
FROM node:lts-alpine AS release
30+
FROM node:20.17.0-alpine3.20 AS release
3131
WORKDIR /src
3232

3333
# Copy production node_modules

0 commit comments

Comments
 (0)