-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issue-6640
- Loading branch information
Showing
18 changed files
with
252 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,10 +44,10 @@ jobs: | |
node-version: ${{ env.NODE_VERSION }} | ||
cache: 'yarn' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
npm install --global --force [email protected] | ||
yarn cache clean && yarn --frozen-lockfile --network-concurrency 1 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
@@ -58,6 +58,11 @@ jobs: | |
username: ${{ vars.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASS }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
npm install --global --force [email protected] | ||
yarn cache clean && yarn --frozen-lockfile --network-concurrency 1 | ||
- name: Set version | ||
id: version | ||
run: | | ||
|
@@ -66,6 +71,7 @@ jobs: | |
VERSION_TAG=$(jq -r .version package.json) | ||
echo "VERSION_TAG=$VERSION_TAG" >> "$GITHUB_OUTPUT" | ||
# TODO: We can use GitHub Actions's matrix option to reduce the build time. | ||
- name: Build and push preview image to Docker Hub | ||
uses: docker/build-push-action@v4 | ||
with: | ||
|
@@ -76,9 +82,9 @@ jobs: | |
context: . | ||
build-args: | | ||
test_all_deps=true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
platforms: linux/amd64 | ||
cache-from: type=gha,scope=multi-platform | ||
cache-to: type=gha,mode=max,scope=multi-platform | ||
platforms: linux/amd64,linux/arm64 | ||
env: | ||
DOCKER_CONTENT_TRUST: true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ client/dist | |
_build | ||
.vscode | ||
.env | ||
.tool-versions | ||
|
||
dump.rdb | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:18-bookworm as frontend-builder | ||
FROM node:18-bookworm AS frontend-builder | ||
|
||
RUN npm install --global --force [email protected] | ||
|
||
|
@@ -20,6 +20,9 @@ COPY --chown=redash scripts /frontend/scripts | |
ARG code_coverage | ||
ENV BABEL_ENV=${code_coverage:+test} | ||
|
||
# Avoid issues caused by lags in disk and network I/O speeds when working on top of QEMU emulation for multi-platform image building. | ||
RUN yarn config set network-timeout 300000 | ||
|
||
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn --frozen-lockfile --network-concurrency 1; fi | ||
|
||
COPY --chown=redash client /frontend/client | ||
|
@@ -86,6 +89,9 @@ ENV POETRY_HOME=/etc/poetry | |
ENV POETRY_VIRTUALENVS_CREATE=false | ||
RUN curl -sSL https://install.python-poetry.org | python3 - | ||
|
||
# Avoid crashes, including corrupted cache artifacts, when building multi-platform images with GitHub Actions. | ||
RUN /etc/poetry/bin/poetry cache clear pypi --all | ||
|
||
COPY pyproject.toml poetry.lock ./ | ||
|
||
ARG POETRY_OPTIONS="--no-root --no-interaction --no-ansi" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.