-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dev/settyan117/city-symbol-specify-pref
- Loading branch information
Showing
62 changed files
with
61,167 additions
and
58,129 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 @@ | ||
HTTP_PROXY_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
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,28 @@ | ||
services: | ||
slackbot: | ||
# build: slackbot | ||
image: ghcr.io/tsg-ut/slackbot-codespaces-image-slackbot:master | ||
volumes: | ||
- ..:/code | ||
- /code/node_modules | ||
- /code/functions/node_modules | ||
stdin_open: true | ||
tty: true | ||
command: sleep infinity | ||
environment: | ||
- TEAM_ID=${TEAM_ID} | ||
- SIGNING_SECRET=${SIGNING_SECRET} | ||
- SLACK_TOKEN=${SLACK_TOKEN} | ||
- HAKATASHI_TOKEN=${HAKATASHI_TOKEN} | ||
- CHANNEL_SANDBOX=${CHANNEL_SANDBOX} | ||
- SLACK_VERIFICATION_TOKEN=${SLACK_VERIFICATION_TOKEN} | ||
|
||
tunnel: | ||
build: | ||
context: tunnel | ||
dockerfile: Dockerfile | ||
args: | ||
- HTTP_PROXY_TOKEN=${HTTP_PROXY_TOKEN} | ||
stdin_open: true | ||
tty: true | ||
command: node index.mjs --remote wss://slackbot-api.tsg.ne.jp/wsfwd --host slackbot |
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,44 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node | ||
{ | ||
"name": "Node.js", | ||
"dockerComposeFile": "compose.yaml", | ||
"service": "slackbot", | ||
"workspaceFolder": "/code", | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": "true", | ||
"username": "slackbot", | ||
"upgradePackages": "true" | ||
} | ||
}, | ||
"runServices": [ | ||
"slackbot", | ||
"tunnel" | ||
], | ||
"postAttachCommand": "docker logs slackbot_devcontainer-tunnel-1 && docker attach slackbot_devcontainer-tunnel-1", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"files.autoSave": "off", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.fixAll.eslint": "always" | ||
}, | ||
"eslint.format.enable": true | ||
}, | ||
"extensions": [ | ||
"ms-vscode.vscode-typescript-next", | ||
"dbaeumer.vscode-eslint", | ||
"GitHub.copilot", | ||
"GitHub.copilot-chat", | ||
"GitHub.vscode-pull-request-github", | ||
"toba.vsfire" | ||
] | ||
} | ||
} | ||
} |
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,24 @@ | ||
FROM node:20-bookworm | ||
|
||
RUN apt-get update -y && \ | ||
# Install build dependencies for node-canvas | ||
# https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems | ||
apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev -y && \ | ||
# Install git and bash | ||
apt-get install git bash -y && \ | ||
# Install ngrok | ||
curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc > /dev/null && \ | ||
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list && \ | ||
apt-get update && \ | ||
apt-get install ngrok -y && \ | ||
# Install slackbot npm dependencies | ||
mkdir -p ~/.cache/slackbot/node_modules && \ | ||
mkdir -p ~/.cache/slackbot-functions/node_modules && \ | ||
git clone https://github.com/tsg-ut/slackbot.git --branch master --single-branch --recursive --depth 1 /code && \ | ||
cd /code && \ | ||
npm install && \ | ||
# Cleanup | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /code |
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,10 @@ | ||
FROM node:20-bookworm | ||
ARG HTTP_PROXY_TOKEN | ||
|
||
RUN apt-get update -y && \ | ||
apt-get install git bash -y && \ | ||
git clone https://${HTTP_PROXY_TOKEN}@github.com/tsg-ut/http-local-fwd.git && \ | ||
cd http-local-fwd/local && \ | ||
npm install | ||
|
||
WORKDIR /http-local-fwd/local |
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,45 @@ | ||
name: Create and publish a Codespaces Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image (slackbot) | ||
id: push_slackbot | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: .devcontainer/slackbot | ||
push: true | ||
tags: ghcr.io/tsg-ut/slackbot-codespaces-image-slackbot:master | ||
|
||
- name: Generate artifact attestation (slackbot) | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-name: ghcr.io/tsg-ut/slackbot-codespaces-image-slackbot | ||
subject-digest: ${{ steps.push_slackbot.outputs.digest }} | ||
push-to-registry: 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 |
---|---|---|
|
@@ -71,3 +71,4 @@ tokens.sqlite3 | |
.DS_Store | ||
|
||
.vscode | ||
!.vscode/launch.json |
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,56 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Slackbot起動", | ||
"type": "node", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": [ | ||
"run-script", | ||
"dev", | ||
"--", | ||
"--only", | ||
"${input:onlyArgument}" | ||
], | ||
"request": "launch", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"console": "internalConsole", | ||
"outputCapture": "std" | ||
}, | ||
{ | ||
"name": "ユニットテストの実行", | ||
"type": "node", | ||
"runtimeExecutable": "npm", | ||
"args": [ | ||
"run-script", | ||
"test", | ||
"--", | ||
"--colors", | ||
"${input:testFilterArgument}" | ||
], | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"request": "launch", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"console": "internalConsole", | ||
"outputCapture": "std" | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "onlyArgument", | ||
"type": "promptString", | ||
"description": "起動するBOTの種類", | ||
"default": "helloworld" | ||
}, | ||
{ | ||
"id": "testFilterArgument", | ||
"type": "promptString", | ||
"description": "実行するユニットテストの正規表現フィルタ (全部実行する場合は空文字列を入力)", | ||
"default": "" | ||
} | ||
] | ||
} |
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
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
Oops, something went wrong.