Skip to content

fix: 代码没改全,导致一小部分仍使用 files.filter #161

fix: 代码没改全,导致一小部分仍使用 files.filter

fix: 代码没改全,导致一小部分仍使用 files.filter #161

Workflow file for this run

name: Push image on master
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # 根据你的项目需要设置 Node.js 版本
- name: Install dependencies
run: npm install
- name: Build
run: npm run build # 确保你的 package.json 中有一个 "build" 脚本
- name: Test
run: npm test # 确保你的 package.json 中有一个 "test" 脚本
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: ./dist # 根据你的项目配置,调整构建输出目录路径
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set environment
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: saltwood233/open93athome
- name: Build and push Docker image
id: push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
tags: saltwood233/open93athome