测试docker运行逻辑

This commit is contained in:
ilovintit 2026-03-04 16:22:36 +08:00
parent f783de7537
commit 0711f3c199
6 changed files with 2 additions and 13423 deletions

View File

@ -1,3 +0,0 @@
# Repository CODEOWNERS
* @actions/actions-oss-maintainers

View File

@ -1,7 +1,3 @@
FROM node:24-alpine FROM reg.songhuwan.com/library/we-chat-ci:v1.0.0
ENTRYPOINT["node","/app/index.js"]
RUN mkdir /app
WORKDIR /app
COPY . /app
RUN npm install
ENTRYPOINT ["node","/app/script/index.js"]

View File

@ -1,12 +0,0 @@
#!/bin/sh -l
# Use INPUT_<INPUT_NAME> to get the value of an input
GREETING="Hello, $INPUT_WHO_TO_GREET!"
# Use workflow commands to do things like set debug messages
echo "::notice file=entrypoint.sh,line=7::$GREETING"
# Write outputs to the $GITHUB_OUTPUT file
echo "time=$(date)" >>"$GITHUB_OUTPUT"
exit 0

13321
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
{
"name": "we-chat-ci",
"version": "1.0.0",
"description": "",
"license": "MIT",
"author": "ilovintit",
"type": "commonjs",
"main": "script/index.js",
"dependencies": {
"miniprogram-ci": "^2.1.26"
}
}

View File

@ -1,69 +0,0 @@
const fs = require('fs')
const path = require('path')
const ci = require('miniprogram-ci')
//
const projectConfigPath = process.env.INPUT_PROJECT_CONFIG_PATH
console.log('projectConfigPath:', projectConfigPath)
//
const uploadSettingPath = process.env.INPUT_UPLOAD_SETTING_PATH
console.log('uploadSettingPath:', uploadSettingPath)
//
const uploadVersion = process.env.INPUT_UPLOAD_VERSION
console.log('uploadVersion:', uploadVersion)
//
const uploadDescription = process.env.INPUT_UPLOAD_DESCRIPTION
console.log('uploadDescription:', uploadDescription)
//
const uploadRobot = Number(process.env.INPUT_UPLOAD_ROBOT)
console.log('uploadRobot:', uploadRobot)
//
const workspace = String(process.env.GITHUB_WORKSPACE)
console.log('workspace:', workspace)
//
const projectConfigJson = fs.readFileSync(
path.join(workspace, projectConfigPath),
'utf8'
)
console.log('projectConfigJson:', projectConfigJson)
const projectConfig = JSON.parse(projectConfigJson)
console.log('deployConfig:', projectConfig)
//
const uploadSettingJson = fs.readFileSync(
path.join(workspace, uploadSettingPath),
'utf8'
)
console.log('uploadSettingJson:', uploadSettingJson)
const uploadSetting = JSON.parse(uploadSettingJson)
console.log('uploadSetting:', uploadSetting)
//
if (!projectConfig.projectPath) {
console.log('projectPath is required')
return
}
projectConfig.projectPath = path.join(workspace, projectConfig.projectPath)
console.log('projectConfig.projectPath:', projectConfig.projectPath)
//
if (!projectConfig.privateKeyPath) {
console.log('privateKeyPath is required')
return
}
projectConfig.privateKeyPath = path.join(
workspace,
projectConfig.privateKeyPath
)
const project = new ci.Project(projectConfig)
ci.upload({
project,
version: uploadVersion,
desc: uploadDescription,
setting: uploadSetting,
robot: uploadRobot,
onProgressUpdate: console.log
})
.then((res) => {
console.log('upload res:', res)
})
.catch((err) => {
console.log('upload err:', err)
})