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

Feat: ssr refactor #232

Merged
merged 154 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
088e192
feat: remove electron from app
rickimoore Mar 3, 2024
b3e49f8
feat: move util folder
rickimoore Mar 4, 2024
f708999
feat: added next and updated configs
rickimoore Mar 4, 2024
a8b89d4
feat: added wip for new structure
rickimoore Mar 4, 2024
9d8c7df
feat: add swr and new endpoint for lighthouse version
rickimoore Mar 4, 2024
e678396
fix: lint
rickimoore Mar 4, 2024
3b938ba
feat: refactored font imports
rickimoore Mar 7, 2024
cc9f613
fix: exported warning icon to component
rickimoore Mar 7, 2024
5471e48
feat: refactored init screen logic
rickimoore Mar 8, 2024
2dd67d1
lint
rickimoore Mar 8, 2024
310d7f4
fix: remove all unused files
rickimoore Apr 17, 2024
a2885bf
fix: updated env example
rickimoore Apr 17, 2024
4da8372
fix: added new node packages and start script
rickimoore Apr 17, 2024
6454ca3
fix: updated and added new utility functions
rickimoore Apr 17, 2024
57f8fa3
fix: add additional file structure to tailwind config
rickimoore Apr 17, 2024
275ca2e
feat: added new next api routes
rickimoore Apr 17, 2024
d5a15ab
feat: added nestjs backend to project
rickimoore Apr 18, 2024
bb3e8d6
feat: added backend with nestjs
rickimoore Apr 18, 2024
198b24c
feat: add eslint react hook plugin
rickimoore Apr 18, 2024
9b42fc3
feat: added new hooks
rickimoore Apr 18, 2024
9412aa4
fix: refactored and added new types
rickimoore Apr 18, 2024
4ad3143
fix: remove unused variables and update names
rickimoore Apr 18, 2024
a7813e9
fix: update hooks
rickimoore Apr 18, 2024
b3d589d
fix: update components
rickimoore Apr 18, 2024
2166ad4
fix: remove unused api functions
rickimoore Apr 18, 2024
608ae63
fix: updated middleware
rickimoore Apr 18, 2024
9d3c15f
feat: create new app pages in nextjs
rickimoore Apr 18, 2024
d06d07e
fix: run prettier
rickimoore Apr 18, 2024
e66375f
fix: type fixes for prod build
rickimoore Apr 19, 2024
493ab0c
fix: added proposer duty api and fixed alerts
rickimoore Apr 23, 2024
b24d197
fix: lint
rickimoore Apr 23, 2024
0c13762
feat: added specs service and db
rickimoore Apr 24, 2024
fe45ef6
feat: added specs module and service to app
rickimoore Apr 24, 2024
5b8d08c
fix: add spec service to beacon service and fetch data from db instea…
rickimoore Apr 24, 2024
e830864
feat: created validator info db and service
rickimoore Apr 24, 2024
9f8c12a
fix: fetch val info for indices and pubkeys from db instead of node
rickimoore Apr 24, 2024
dc733dd
feat: added scheduler module to backend
rickimoore Apr 26, 2024
2a8336c
feat: added val types
rickimoore Apr 26, 2024
575540d
feat: added new func to util service
rickimoore Apr 26, 2024
1bd5177
fix: removed spec service and export function to beacon service
rickimoore Apr 26, 2024
c198d44
fix: make sure unique validators are stored in db
rickimoore Apr 26, 2024
6dd3c45
fix: removed val-detail service
rickimoore Apr 26, 2024
17f599a
feat: created validator metric table and new api endpoint
rickimoore Apr 26, 2024
32820cc
fix: updated validator metric components
rickimoore Apr 26, 2024
33eb466
feat: added a task module to handle scheduling tasks for updating dat…
rickimoore Apr 26, 2024
62bcd55
feat: added cookie module to nextjs
rickimoore May 8, 2024
89e28b8
feat: added cache manager and jwt to backend
rickimoore May 8, 2024
89f3862
feat: added api token to all endpoints
rickimoore May 8, 2024
09d02cd
feat: add auth route and guards to controllers
rickimoore May 8, 2024
a4adc9e
feat: added cache management and removed un needed databases
rickimoore May 8, 2024
94e458f
feat: added new log apis and auth
rickimoore May 8, 2024
98e9f80
fix: updated init page with auth
rickimoore May 8, 2024
151012a
feat: update logs
rickimoore May 8, 2024
1a11d1c
feat: added new tasks for log repo
rickimoore May 8, 2024
e980e5e
feat: added new guard for auth, updated session guard
rickimoore May 11, 2024
effb1b6
fix: refactor auth modal
rickimoore May 11, 2024
063118a
fix: converted bls execution
rickimoore May 11, 2024
6f2356b
fix: onvert val exit execution
rickimoore May 11, 2024
9a1aaa7
fix: convert val graffiti execution
rickimoore May 11, 2024
f20217c
fix: clean up types
rickimoore May 11, 2024
3c44673
fix: remove logs from gitignore
rickimoore May 11, 2024
2bb1dd6
fix: remove cache logic from frontend
rickimoore May 13, 2024
b0a0579
fix: added util for fetching slot interval from bn spec
rickimoore May 13, 2024
f0945d0
feat: add cache to all endpoints that directly access the node
rickimoore May 13, 2024
92c2835
fix: update .env example file
rickimoore May 13, 2024
bf6e568
feat: add package to shutdown app
rickimoore May 13, 2024
3025518
feat: check if jwt token is expired and redirect to auth page after r…
rickimoore May 13, 2024
a2798ee
fix: give accurate error message for app shutdown
rickimoore May 13, 2024
f42db2c
fix: remove sensitive info from jwt token
rickimoore May 13, 2024
1f1967f
fix: fix slot interval time
rickimoore May 13, 2024
c6e4182
fix: remove unused file
rickimoore May 13, 2024
42e60c8
feat: set token exp to 2 hours
rickimoore May 13, 2024
53438e8
fix: refactored auth modal to auth prompt
rickimoore May 14, 2024
176b55a
lint
rickimoore May 14, 2024
1191166
fix: update auth fail message and bls auth modal
rickimoore May 14, 2024
36ed5da
fix: update validator exit auth modal
rickimoore May 14, 2024
19ba160
fix: remove autocomplete on auth password input
rickimoore May 14, 2024
8e09843
fix: allow enter button to submit form
rickimoore May 14, 2024
1649248
fix: balance correction for withdrawn validators
rickimoore May 15, 2024
89cbe0d
fix: refactor validator row modal render
rickimoore May 15, 2024
4016512
fix: added holesky as a bn network
rickimoore May 15, 2024
621ec7c
Package siren (#234)
antondlr May 16, 2024
0b53eab
Merge remote-tracking branch 'origin/feat/ssr-refactor' into feat/ssr…
rickimoore May 16, 2024
79bb2bf
fix: type fixes for prod build
rickimoore May 20, 2024
505532c
fix: add unused import package to eslint and fixed warnings
rickimoore May 20, 2024
5976019
feat: added stranslations for auth prompt
rickimoore May 20, 2024
55d5b04
fix: allow close auth prompt modal
rickimoore May 20, 2024
2cae63e
fix: added mode to component
rickimoore May 20, 2024
86d347a
feat: created util and and clean up task service
rickimoore May 21, 2024
560c4ec
fix: dont delete db on init app
rickimoore May 21, 2024
d00a16c
fix: add typings to backend service functions
rickimoore May 21, 2024
e257775
fix: added all return types on beacon services
rickimoore May 21, 2024
12ebc28
fix: updated typing on node service
rickimoore May 22, 2024
4610b58
fix: created util for repeated code
rickimoore May 22, 2024
80ba4fe
fix: added return types to utils service
rickimoore May 22, 2024
ecb6dac
fix: add return types for validator service
rickimoore May 22, 2024
5cc75c9
feat: added unit test for app controller auth
rickimoore May 22, 2024
80e996d
feat: added unit test for beacon controller
rickimoore May 22, 2024
f50e5f1
fix: remove un wanted service tests
rickimoore May 27, 2024
db7f411
feat: added to node controller tests
rickimoore May 27, 2024
a2d9662
feat: added backend unit tests to husky precommit
rickimoore May 28, 2024
8c14e6a
lint
rickimoore May 28, 2024
d69b584
fix: updated all unit tests to pass
rickimoore May 29, 2024
1491d68
remove unused tests and utils
rickimoore Jun 4, 2024
851fb1a
Replace `local-testnet` with Kurtosis. (#235)
jimmygchen Jun 5, 2024
92dd0b4
feat: added error message translation key
rickimoore Jun 6, 2024
e6eea81
feat: added translations for init modals
rickimoore Jun 6, 2024
003724a
feat: added more translations
rickimoore Jun 6, 2024
647508d
feat: redirect to dashboard if already visited health check
rickimoore Jun 6, 2024
6a1fd2d
feat: redirect to dashboard if beacon mostly synced
rickimoore Jun 6, 2024
3b74ee4
feat: added error fallback page
rickimoore Jun 6, 2024
5d6be39
fix: removed commented code
rickimoore Jun 10, 2024
d2ce61e
feat: added manual dimension measurement function
rickimoore Jun 10, 2024
b0f1981
feat: added field for username on init screen auth
rickimoore Jun 10, 2024
6ad77cf
feat: implemented name and new anim in auth prompt
rickimoore Jun 10, 2024
b79d8c6
feat: upgraded earning wav anim
rickimoore Jun 10, 2024
85b0615
feat: added speed and name params to animated header
rickimoore Jun 10, 2024
49d152c
feat: added animation header to validator card
rickimoore Jun 10, 2024
1add8c2
feat: added animated header to bls modal
rickimoore Jun 10, 2024
6a654a7
feat: updated wave anims
rickimoore Jun 10, 2024
6d8d696
fix: slow down auth anim and fix double submit
rickimoore Jun 10, 2024
08556e6
fix: anim name change
rickimoore Jun 10, 2024
e812036
fix: remove index error on validator metrics api
rickimoore Jun 10, 2024
d0c5245
fix: error message corrections
rickimoore Jun 10, 2024
9f66f9f
feat: add siren icon to metadatas
rickimoore Jun 10, 2024
6f98356
fix: add missing types
rickimoore Jun 10, 2024
fc167f5
fix: slow down anim on account earnings
rickimoore Jun 10, 2024
bde4786
feat: added feedback to alert dismiss functions
rickimoore Jun 10, 2024
1132888
fix: move health check to local storage and fix redirect error
rickimoore Jun 11, 2024
81304f7
fix: inclusion percentage api update
rickimoore Jun 11, 2024
ff02f39
Update EarningsLayout.tsx
rickimoore Jun 11, 2024
bf9fec9
fix: fixes for production build
rickimoore Jun 11, 2024
d6116a6
kurtosis package moved to ethpandaops
antondlr Jun 13, 2024
4fdc85e
Merge remote-tracking branch 'origin/feat/ssr-refactor' into feat/ssr…
rickimoore Jun 13, 2024
a24325f
fix: add framer motion
rickimoore Jun 14, 2024
b895b8d
fix: update validator modal structure
rickimoore Jun 14, 2024
602796b
fix: update them handling
rickimoore Jun 14, 2024
6eb6245
fix: sidebar paddings
rickimoore Jun 14, 2024
8ad09bd
feat: ignore certs
rickimoore Jun 18, 2024
56e43b9
fix: added detailed error messages to auth fail
rickimoore Jun 18, 2024
4488a1f
chore: updated specs
rickimoore Jun 18, 2024
ac60f5b
feat: update validator row to correctly fitted in
rickimoore Jun 18, 2024
aee8c74
fix: add dark web , web logic
rickimoore Jun 18, 2024
a846f81
fix: updated holskey beaconcha address
rickimoore Jun 18, 2024
3094243
feat: added transkays for error page
rickimoore Jun 18, 2024
b5cb6ba
debug auth api
rickimoore Jun 19, 2024
6077460
debug auth api
rickimoore Jun 19, 2024
22041d9
fix: added more error message details
rickimoore Jun 19, 2024
e13d7f9
Fix env exmaple
AgeManning Jun 19, 2024
2f021de
Package siren (docker) (#236)
antondlr Jun 19, 2024
390cab2
fix: safari max-height adjustment
rickimoore Jun 20, 2024
5c9d04c
fix: added sepolia to beaconcha urls
rickimoore Jun 20, 2024
64904ec
fix: remove unused rows on table
rickimoore Jun 20, 2024
039da03
fix: remove ui tests on github workflow
rickimoore Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
PORT=
ELECTRON_START_URL=
APPLE_ID=YOUR-APPLE-ID
APPLE_PASSWORD=APP-SPECIFIC-PASSWORD
APPLE_TEAM_ID=YOUR-TEAM-ID
PORT=3000
BACKEND_URL=http://127.0.0.1:3001
BEACON_URL=http://your-BN-ip:5052
VALIDATOR_URL=http://your-VC-ip:5062
API_TOKEN=get-it-from-'.lighthouse/validators/api-token.txt'
SESSION_PASSWORD="your-password"
SSL_ENABLED=true
68 changes: 25 additions & 43 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,29 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:storybook/recommended"
"plugins": ["@typescript-eslint", "import", "react-hooks", "unused-imports"],
"extends": ["next/core-web-vitals"],
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"prettier"
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"rules": {
"react/react-in-jsx-scope": "off",
"spaced-comment": "error",
"quotes": [
"error",
"single"
],
"no-duplicate-imports": "error",
"react/prop-types": 0,
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
"react/react-in-jsx-scope": "off"
}
}
18 changes: 10 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: rickimoore

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: rickimoore

---

**Is your feature request related to a problem? Please describe.**
Expand Down
237 changes: 118 additions & 119 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,129 +1,128 @@
name: docker

on:
push:
branches:
- unstable
- stable
tags:
- v*
push:
branches:
- unstable
- stable
tags:
- v*

env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/siren
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/siren

jobs:
# Extract the VERSION which is either `latest` or `vX.Y.Z`, and the VERSION_SUFFIX
# which is either empty or `-unstable`.
#
# It would be nice if the arch didn't get spliced into the version between `latest` and
# `unstable`, but for now we keep the two parts of the version separate for backwards
# compatibility.
extract-version:
runs-on: ubuntu-22.04
steps:
- name: Extract version (if stable)
if: github.event.ref == 'refs/heads/stable'
run: |
echo "VERSION=latest" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV
- name: Extract version (if unstable)
if: github.event.ref == 'refs/heads/unstable'
run: |
echo "VERSION=latest" >> $GITHUB_ENV
echo "VERSION_SUFFIX=-unstable" >> $GITHUB_ENV
- name: Extract version (if tagged release)
if: startsWith(github.event.ref, 'refs/tags')
run: |
echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV
outputs:
VERSION: ${{ env.VERSION }}
VERSION_SUFFIX: ${{ env.VERSION_SUFFIX }}
build-html:
name: build html
runs-on: ubuntu-22.04
needs: [extract-version]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use node 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
env:
NODE_ENV: development
run: |
yarn
- name: Build Siren
env:
NODE_ENV: production
run: yarn build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: html
path: build/

build-docker-single-arch:
name: build-docker-${{ matrix.binary }}
runs-on: ubuntu-22.04
strategy:
matrix:
binary: [aarch64, x86_64]

needs: [extract-version, build-html]
# Extract the VERSION which is either `latest` or `vX.Y.Z`, and the VERSION_SUFFIX
# which is either empty or `-unstable`.
#
# It would be nice if the arch didn't get spliced into the version between `latest` and
# `unstable`, but for now we keep the two parts of the version separate for backwards
# compatibility.
extract-version:
runs-on: ubuntu-22.04
steps:
- name: Extract version (if stable)
if: github.event.ref == 'refs/heads/stable'
run: |
echo "VERSION=latest" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV
- name: Extract version (if unstable)
if: github.event.ref == 'refs/heads/unstable'
run: |
echo "VERSION=latest" >> $GITHUB_ENV
echo "VERSION_SUFFIX=-unstable" >> $GITHUB_ENV
- name: Extract version (if tagged release)
if: startsWith(github.event.ref, 'refs/tags')
run: |
echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV
outputs:
VERSION: ${{ env.VERSION }}
VERSION_SUFFIX: ${{ env.VERSION_SUFFIX }}
build-html:
name: build html
runs-on: ubuntu-22.04
needs: [extract-version]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use node 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
env:
# We need to enable experimental docker features in order to use `docker buildx`
DOCKER_CLI_EXPERIMENTAL: enabled
VERSION: ${{ needs.extract-version.outputs.VERSION }}
VERSION_SUFFIX: ${{ needs.extract-version.outputs.VERSION_SUFFIX }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Map aarch64 to arm64 short arch
if: startsWith(matrix.binary, 'aarch64')
run: echo "SHORT_ARCH=arm64" >> $GITHUB_ENV
- name: Map x86_64 to amd64 short arch
if: startsWith(matrix.binary, 'x86_64')
run: echo "SHORT_ARCH=amd64" >> $GITHUB_ENV;
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: html
path: html/
- name: Build Dockerfile and push
run: |
docker buildx build \
--platform=linux/${SHORT_ARCH} \
--file ./Dockerfile.release . \
--tag ${IMAGE_NAME}:${VERSION}-${SHORT_ARCH}${VERSION_SUFFIX} \
--provenance=false \
--push

build-docker-multiarch:
name: build-docker-multiarch
runs-on: ubuntu-22.04
needs: [build-docker-single-arch, extract-version]
NODE_ENV: development
run: |
yarn
- name: Build Siren
env:
# We need to enable experimental docker features in order to use `docker manifest`
DOCKER_CLI_EXPERIMENTAL: enabled
VERSION: ${{ needs.extract-version.outputs.VERSION }}
VERSION_SUFFIX: ${{ needs.extract-version.outputs.VERSION_SUFFIX }}
steps:
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Create and push multiarch manifest
run: |
docker manifest create ${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX} \
--amend ${IMAGE_NAME}:${VERSION}-arm64${VERSION_SUFFIX} \
--amend ${IMAGE_NAME}:${VERSION}-amd64${VERSION_SUFFIX};
docker manifest push ${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX}
NODE_ENV: production
run: yarn build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: html
path: build/

build-docker-single-arch:
name: build-docker-${{ matrix.binary }}
runs-on: ubuntu-22.04
strategy:
matrix:
binary: [aarch64, x86_64]

needs: [extract-version, build-html]
env:
# We need to enable experimental docker features in order to use `docker buildx`
DOCKER_CLI_EXPERIMENTAL: enabled
VERSION: ${{ needs.extract-version.outputs.VERSION }}
VERSION_SUFFIX: ${{ needs.extract-version.outputs.VERSION_SUFFIX }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Map aarch64 to arm64 short arch
if: startsWith(matrix.binary, 'aarch64')
run: echo "SHORT_ARCH=arm64" >> $GITHUB_ENV
- name: Map x86_64 to amd64 short arch
if: startsWith(matrix.binary, 'x86_64')
run: echo "SHORT_ARCH=amd64" >> $GITHUB_ENV;
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: html
path: html/
- name: Build Dockerfile and push
run: |
docker buildx build \
--platform=linux/${SHORT_ARCH} \
--file ./Dockerfile.release . \
--tag ${IMAGE_NAME}:${VERSION}-${SHORT_ARCH}${VERSION_SUFFIX} \
--provenance=false \
--push

build-docker-multiarch:
name: build-docker-multiarch
runs-on: ubuntu-22.04
needs: [build-docker-single-arch, extract-version]
env:
# We need to enable experimental docker features in order to use `docker manifest`
DOCKER_CLI_EXPERIMENTAL: enabled
VERSION: ${{ needs.extract-version.outputs.VERSION }}
VERSION_SUFFIX: ${{ needs.extract-version.outputs.VERSION_SUFFIX }}
steps:
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Create and push multiarch manifest
run: |
docker manifest create ${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX} \
--amend ${IMAGE_NAME}:${VERSION}-arm64${VERSION_SUFFIX} \
--amend ${IMAGE_NAME}:${VERSION}-amd64${VERSION_SUFFIX};
docker manifest push ${IMAGE_NAME}:${VERSION}${VERSION_SUFFIX}
Loading