ci: dockerize

このコミットが含まれているのは:
sinkaroid 2022-12-11 00:20:29 +07:00
コミット b4baffb8f4
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: ABD69470B2390135
3個のファイルの変更4行の追加3行の削除

ファイルの表示

@ -70,12 +70,12 @@ jobs:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/nodejs-demo:latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/jandapress:latest
- name: Run the image in a container
uses: addnab/docker-run-action@v3
with:
image: ${{ secrets.DOCKERHUB_USERNAME }}/nodejs-demo:latest
image: ${{ secrets.DOCKERHUB_USERNAME }}/jandapress:latest
run: |
echo "runing the docker image"
echo ${{ steps.docker_build.outputs.digest }}

ファイルの表示

@ -3,6 +3,6 @@ WORKDIR /srv/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN npm run postinstall
EXPOSE 3000
CMD ["node", "build/src/index.js"]

ファイルの表示

@ -12,6 +12,7 @@
"start:dev": "ts-node-dev src/index.ts",
"lint": "npx eslint . --ext .ts",
"lint:fix": "npx eslint . --fix",
"postinstall": "npm run build",
"test:nhentai": "npx start-server-and-test 3000 \"curl -v http://localhost:3000/nhentai/get?book=177013 | jq '.'\"",
"test:pururin": "npx start-server-and-test 3000 \"curl -v http://localhost:3000/pururin/get?book=47226 | jq '.'\"",
"test:hentaifox": "npx start-server-and-test 3000 \"curl -v http://localhost:3000/hentaifox/get?book=59026 | jq '.'\"",