Skip to content

Commit

Permalink
ci: docker and release
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Apr 5, 2024
1 parent 0647c0b commit d99dbdf
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PaperAI Docker Image Push

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: 14790897/auto-read:latest
16 changes: 16 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Please
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.GH_TOKEN }}
release-type: node
package-name: auto-read
permissions:
contents: write
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 使用官方 Node.js 作为父镜像
FROM node:14-slim
FROM node:18-slim

# 设置工作目录
WORKDIR /app
Expand Down Expand Up @@ -54,9 +54,6 @@ RUN apt-get update && apt-get install -y \
# 安装 Node.js 依赖
RUN npm install

# 如果你的 Puppeteer 脚本在安装时没有下载 Chromium,取消下一行的注释
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

# 将你的 Puppeteer 脚本复制到容器中
COPY . .

Expand Down

0 comments on commit d99dbdf

Please sign in to comment.