This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
-
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.
* feat: dockerサポート * ci: fix shellcheck
- Loading branch information
Showing
7 changed files
with
130 additions
and
58 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,26 @@ | ||
name: Actionlint with reviewdog | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run ationlint (Push) | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
./actionlint -color | ||
- name: Run actionlint (Pull-request) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: reviewdog/action-actionlint@v1 | ||
with: | ||
fail_on_error: true |
This file was deleted.
Oops, something went wrong.
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,66 @@ | ||
# 任意のレジストリに Docker image を公開orビルドする。 | ||
# master/mainのプッシュ時、プルリクの作成・更新時、リリース時に動作する。 | ||
|
||
name: Docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
DOCKER_USERNAME: ${{ github.actor }} | ||
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
IMAGE_NAME: ${{ github.repository }} | ||
PLATFORMS: linux/amd64,linux/arm64 | ||
|
||
jobs: | ||
job: | ||
name: Docker build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
install: true | ||
|
||
- name: Login to ${{ env.REGISTRY }} | ||
if: github.event_name == 'release' | ||
uses: docker/login-action@v2.0.0 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ env.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4.0.1 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3.1.1 | ||
with: | ||
context: . | ||
push: ${{ github.event_name == 'release' }} | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:16 as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY yarn.lock . | ||
RUN yarn install && \ | ||
yarn cache clean | ||
|
||
COPY src/ src/ | ||
COPY tsconfig.json . | ||
|
||
COPY entrypoint.sh . | ||
|
||
ENTRYPOINT [ "/app/entrypoint.sh" ] |
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,11 @@ | ||
version: '3.8' | ||
|
||
services: | ||
app: | ||
build: . | ||
# image: ghcr.io/jaoafa/jaotanChatLogger3:latest | ||
volumes: | ||
- type: bind | ||
source: ./config/ | ||
target: /app/config/ | ||
init: true |
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 @@ | ||
#!/bin/sh | ||
|
||
while : | ||
do | ||
yarn build || true | ||
done |