-
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.
- Loading branch information
0 parents
commit c42a9d9
Showing
90 changed files
with
16,498 additions
and
0 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,23 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Copyright (c) Pedersen authors. | ||
# | ||
# Use of this source code is governed by an MIT-style | ||
# license that can be found in the LICENSE file or at | ||
# https://opensource.org/licenses/MIT. | ||
|
||
ARG GO_VARIANT=1.17-alpine | ||
|
||
FROM golang:${GO_VARIANT} | ||
|
||
ARG GO_OPENSSL_VERSION_OVERRIDE=1.1.1 | ||
|
||
ENV GO_OPENSSL_VERSION_OVERRIDE=${GO_OPENSSL_VERSION_OVERRIDE} | ||
|
||
RUN apk update && \ | ||
apk del --no-cache openssl && \ | ||
apk add --no-cache make build-base pkgconfig coreutils perl linux-headers | ||
|
||
COPY scripts/openssl.sh /tmp/openssl.sh | ||
|
||
RUN /tmp/openssl.sh --dev ${GO_OPENSSL_VERSION_OVERRIDE} |
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,19 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Copyright (c) Pedersen authors. | ||
# | ||
# Use of this source code is governed by an MIT-style | ||
# license that can be found in the LICENSE file or at | ||
# https://opensource.org/licenses/MIT. | ||
|
||
ARG NODE_VERSION=20 | ||
|
||
FROM node:${NODE_VERSION}-alpine | ||
|
||
EXPOSE 3000 | ||
|
||
WORKDIR /src | ||
|
||
RUN apk add --no-cache git | ||
|
||
ENV NODE_ENV=dev |
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,16 @@ | ||
{ | ||
"name": "Pedersen Docs", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "../..", | ||
"args": { | ||
"NODE_VERSION": "20" | ||
} | ||
}, | ||
"postStartCommand": "cd docs && yarn install && yarn start", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["ms-vscode.vscode-typescript-next", "leizongmin.node-module-intellisense"] | ||
} | ||
} | ||
} |
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,16 @@ | ||
{ | ||
"name": "Pedersen 1.0.2", | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
"context": "../..", | ||
"args": { | ||
"GO_VARIANT": "1.17-alpine", | ||
"GO_OPENSSL_VERSION_OVERRIDE": "1.0.2" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["golang.go", "ms-vscode.cpptools-extension-pack"] | ||
} | ||
} | ||
} |
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,16 @@ | ||
{ | ||
"name": "Pedersen 1.1.0", | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
"context": "../..", | ||
"args": { | ||
"GO_VARIANT": "1.17-alpine", | ||
"GO_OPENSSL_VERSION_OVERRIDE": "1.1.0" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["golang.go", "ms-vscode.cpptools-extension-pack"] | ||
} | ||
} | ||
} |
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,16 @@ | ||
{ | ||
"name": "Pedersen 1.1.1", | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
"context": "../..", | ||
"args": { | ||
"GO_VARIANT": "1.17-alpine", | ||
"GO_OPENSSL_VERSION_OVERRIDE": "1.1.1" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["golang.go", "ms-vscode.cpptools-extension-pack"] | ||
} | ||
} | ||
} |
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,16 @@ | ||
{ | ||
"name": "Pedersen 3.0.1", | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
"context": "../..", | ||
"args": { | ||
"GO_VARIANT": "1.17-alpine", | ||
"GO_OPENSSL_VERSION_OVERRIDE": "3.0.1" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["golang.go", "ms-vscode.cpptools-extension-pack"] | ||
} | ||
} | ||
} |
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 @@ | ||
bin/ |
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,18 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Matches multiple files with brace expansion notation | ||
# Set default charset | ||
[*.{go}] | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.go] | ||
indent_style = tab |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: daily |
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,127 @@ | ||
--- | ||
name: Docs | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
schedule: | ||
- cron: '0 8 */6 * *' # every 6 days to keep cache | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: 'Release tag' | ||
required: true | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
RELEASE_BRANCH: master | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
release_tag: ${{ steps.release_tag.outputs.release_tag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get latest tag on release branch | ||
id: release_tag | ||
run: | | ||
set -ex | ||
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.release_tag }}" ]; then | ||
echo "release_tag=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT | ||
elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref }}" = "refs/heads/${{ env.RELEASE_BRANCH }}" ]; then | ||
echo "release_tag=$(git describe --match 'v[0-9]*' --abbrev=0 --tags ${RELEASE_BRANCH})" >> $GITHUB_OUTPUT || \ | ||
echo "release_tag=" >> $GITHUB_OUTPUT | ||
else | ||
echo "release_tag=" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Show latest release tag | ||
run: | | ||
echo ${{ steps.release_tag.outputs.release_tag }} | ||
build: | ||
runs-on: ubuntu-22.04 | ||
needs: [prepare] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build docs | ||
uses: docker/bake-action@v3 | ||
with: | ||
targets: docs | ||
set: | | ||
*.args.ORGANIZATION_NAME=${{ github.repository_owner }} | ||
*.args.REPO_NAME=${{ github.event.repository.name }} | ||
*.args.REPO_URL=${{ github.server_url }}/${{ github.repository }} | ||
*.args.DOCS_URL=https://${{ github.repository_owner }}.github.io | ||
*.args.DOCS_EDIT_URL=${{ github.server_url }}/${{ github.repository }}/tree/${{ env.RELEASE_BRANCH }}/docs/ | ||
*.args.VERSION=${{ needs.prepare.outputs.release_tag }} | ||
*.cache-from=type=gha,scope=docs | ||
*.cache-to=type=gha,scope=docs,mode=max | ||
env: | ||
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | ||
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }} | ||
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: ./bin/docs/* | ||
if-no-files-found: error | ||
|
||
release: | ||
needs: [prepare, build] | ||
runs-on: ubuntu-22.04 | ||
if: ${{ needs.prepare.outputs.release_tag != '' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: docs | ||
path: /tmp/pedersen-docs | ||
|
||
- name: List docs files | ||
run: | | ||
echo "DOCS_FILES<<EOF" >> $GITHUB_ENV | ||
find /tmp/pedersen-docs -type f -printf "%P\n" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Move docs files | ||
run: | | ||
rsync -cavr --ignore-times --delete /tmp/pedersen-docs/ . | ||
- name: Commit changes | ||
uses: swinton/[email protected] | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: ${{ env.DOCS_FILES }} | ||
commit-message: Update docs | ||
ref: refs/heads/gh-pages |
Oops, something went wrong.