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

Fix GitHub Actions builds #592

Merged
merged 9 commits into from
Nov 6, 2024
Merged
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
64 changes: 26 additions & 38 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 'Alpha Build'
name: "Alpha Build"

on:
push:
branches: [v543/deps]
branches: [v552/fix-docker-build]

jobs:
frontend:
Expand All @@ -14,13 +14,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -45,13 +42,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -76,13 +70,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -107,13 +98,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -152,26 +140,26 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: retrospected/frontend:alpha
format: 'table'
exit-code: '1'
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
vuln-type: "os,library"
severity: "CRITICAL"
- name: Trivy - Backend
uses: aquasecurity/trivy-action@master
with:
image-ref: retrospected/backend:alpha
format: 'table'
exit-code: '1'
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
vuln-type: "os,library"
severity: "CRITICAL"
- name: Trivy - Marketing
uses: aquasecurity/trivy-action@master
with:
image-ref: retrospected/marketing:alpha
format: 'table'
exit-code: '1'
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
vuln-type: "os,library"
severity: "CRITICAL"
71 changes: 28 additions & 43 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Canary Build'
name: "Canary Build"

on:
push:
Expand All @@ -14,13 +14,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -45,13 +42,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -76,13 +70,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -107,13 +98,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -138,13 +126,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -183,26 +168,26 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: retrospected/frontend:canary
format: 'table'
exit-code: '1'
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
vuln-type: "os,library"
severity: "CRITICAL"
- name: Trivy - Backend
uses: aquasecurity/trivy-action@master
with:
image-ref: retrospected/backend:canary
format: 'table'
exit-code: '1'
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
vuln-type: "os,library"
severity: "CRITICAL"
- name: Trivy - Marketing
uses: aquasecurity/trivy-action@master
with:
image-ref: retrospected/marketing:canary
format: 'table'
exit-code: '1'
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
vuln-type: "os,library"
severity: "CRITICAL"
11 changes: 4 additions & 7 deletions .github/workflows/marketing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Marketing Build'
name: "Marketing Build"

on:
push:
Expand All @@ -14,13 +14,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand Down
47 changes: 16 additions & 31 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Master Build'
name: "Master Build"

on:
push:
Expand All @@ -14,13 +14,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -45,13 +42,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -76,13 +70,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -107,13 +98,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand All @@ -138,13 +126,10 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master
- name: Echo VERSION
run: echo ${{ steps.package.outputs.current-version }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup BuildX
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts-alpine
FROM node:22-alpine

WORKDIR /usr/src/backend

Expand Down
2 changes: 1 addition & 1 deletion backend/instrument.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Sentry from "@sentry/node";
import packageJson from './package.json' assert { type: 'json' };
import packageJson from './package.json' with { type: 'json' };

const { version } = packageJson;
const useSentry = !!process.env.SENTRY_URL&& process.env.SENTRY_URL!== 'NO_SENTRY';
Expand Down
4 changes: 2 additions & 2 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This must be run with the Docker context set to the root folder of the repository
# (the one with the yarn.lock file)

FROM --platform=$BUILDPLATFORM node:lts-alpine as Node
FROM --platform=$BUILDPLATFORM node:20-alpine AS node

ENV NODE_ENV=production

Expand Down Expand Up @@ -30,7 +30,7 @@ RUN yarn build

FROM nginx:alpine

COPY --from=Node /home/node/app/build /usr/share/nginx/html
COPY --from=node /home/node/app/build /usr/share/nginx/html
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf

CMD ["nginx", "-g", "daemon off;"]
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM node:lts-alpine AS node
FROM --platform=$BUILDPLATFORM node:22-alpine AS node

ENV NODE_ENV=production

Expand Down
Loading
Loading