forked from foxssake/natty
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into try-implement-way-to-modify-id-generation
- Loading branch information
Showing
4 changed files
with
89 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,7 @@ | ||
.github | ||
test/ | ||
.editorconfig | ||
.env.example | ||
.eslintrc.js | ||
.jsdoc.js | ||
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Docker Publish | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# From https://docs.github.com/en/actions/publishing-packages/publishing-docker-images | ||
jobs: | ||
docker-publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
- name: Build and push ( if on main ) Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 @@ | ||
FROM node:18-alpine | ||
# From https://github.com/pnpm/pnpm/issues/4837 | ||
|
||
EXPOSE 8890/tcp | ||
EXPOSE 8891/udp | ||
|
||
COPY . noray | ||
|
||
WORKDIR noray | ||
|
||
RUN npm i -g npm@latest; \ | ||
# Install pnpm | ||
npm install -g pnpm; \ | ||
pnpm --version; \ | ||
pnpm setup; \ | ||
mkdir -p /usr/local/share/pnpm &&\ | ||
export PNPM_HOME="/usr/local/share/pnpm" &&\ | ||
export PATH="$PNPM_HOME:$PATH"; \ | ||
pnpm bin -g &&\ | ||
# Install dependencies | ||
pnpm install | ||
|
||
CMD pnpm start:prod |
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