forked from sigp/siren
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: antondlr <anton@delaruelle.net> Co-authored-by: Jimmy Chen <jchen.tc@gmail.com> Co-authored-by: Age Manning <Age@AgeManning.com>
- Loading branch information
1 parent
e58a5a4
commit 4141c17
Showing
521 changed files
with
20,569 additions
and
28,188 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
backend/node_modules |
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,5 +1,9 @@ | ||
PORT= | ||
ELECTRON_START_URL= | ||
APPLE_ID=YOUR-APPLE-ID | ||
APPLE_PASSWORD=APP-SPECIFIC-PASSWORD | ||
APPLE_TEAM_ID=YOUR-TEAM-ID | ||
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=default-siren-password | ||
SSL_ENABLED=true | ||
DEBUG=false | ||
# don't change these when building the docker image, only change when running outside of docker | ||
PORT=3000 | ||
BACKEND_URL=http://127.0.0.1:3001 |
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,2 +1 @@ | ||
src/main.js | ||
src/scripts/release.js |
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,39 +1,29 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"overrides": [ | ||
"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 | ||
} | ||
} | ||
], | ||
"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" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,96 @@ | ||
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@v3 | ||
- name: Use node 18 | ||
uses: actions/setup-node@v3 | ||
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/ | ||
# 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-docker-single-arch: | ||
name: build-docker-${{ matrix.binary }} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
binary: [aarch64, x86_64] | ||
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@v3 | ||
- uses: docker/setup-qemu-action@v2 | ||
- 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} | ||
needs: [extract-version] | ||
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: Build Dockerfile and push | ||
run: | | ||
docker buildx build \ | ||
--platform=linux/${SHORT_ARCH} \ | ||
--file ./Dockerfile . \ | ||
--tag ${IMAGE_NAME}:${VERSION}-${SHORT_ARCH}${VERSION_SUFFIX} \ | ||
--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} |
Oops, something went wrong.