[MAINT] Github Actions Reunification - `sansec-ecomscan`
@damienwebdev 已经在做这个了。
开始于 2026年5月6日。
评估
这个 Issue 还没有评估数据。
描述
Action: sansec-ecomscan (new)
Status: 🔴 Convert workflow → action
Source: .github/workflows/sansec-ecomscan.yml (mage-os-only)
Target: sansec-ecomscan/action.yml + .github/workflows/sansec-ecomscan.yml (thin caller)
What the workflow currently does
- Checks out the repo (
actions/checkout@v5,persist-credentials: false, PR head SHA) - Downloads the ecomscan binary from
https://ecomscan.com/downloads/linux-amd64/ecomscan chmod +x ecomscan- Runs
./ecomscan --no-auto-update --skip-database --deep --format=csv .withECOMSCAN_KEYenv var - Fails (
exit 1) if any output is produced
Dependents
No external repos call this workflow (per dependents.md). It is only used internally by mage-os/github-actions itself. This makes the conversion low risk.
Design decisions
- Checkout stays in the caller workflow — consistent with the pattern used by other actions in this repo (
setup-magento,coding-standardpost-refactor, etc.) - License key passed as an input — composite actions cannot read
secretsdirectly; callers must pass the value explicitly persist-credentials: falseandrefhandling — these checkout options are caller concerns and stay in the workflowpull_request_targettrigger and the push-on-PR skip guard — these are workflow-level concerns and stay in the caller
New action: sansec-ecomscan/action.yml
Inputs
| Input | Required | Description |
|---|---|---|
ecomscan_key |
true | Sansec license key (ECOMSCAN_KEY) |
Steps
- Download ecomscan binary
chmod +x ecomscan- Run ecomscan, fail on output
Updated workflow: .github/workflows/sansec-ecomscan.yml
Becomes a thin caller that handles checkout and trigger logic, then delegates to the action:
on:
push:
pull_request_target:
workflow_dispatch:
jobs:
run-ecomscan:
if: github.event.pull_request == null || github.event_name != 'push'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- uses: mage-os/github-actions/sansec-ecomscan@main
with:
ecomscan_key: ${{ secrets.SANSEC_LICENSE_KEY }}
Implementation steps
- Create
sansec-ecomscan/action.ymlas a composite action with the download/chmod/run steps and anecomscan_keyinput - Update
.github/workflows/sansec-ecomscan.ymlto the thin caller above - Bump
actions/checkoutfromv5tov6in the workflow
- 主要语言
- TypeScript
- 星标
- 12
- 派生
- 15
- 平均合并
- 3 天 15 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mage-os/github-actions 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
mage-os/github-actions#341 ·
-
难度 1/5 1 小时以内 新手友好度 80/100
mage-os/github-actions#340 ·
-
难度 3/5 1-2 天 新手友好度 35/100
mage-os/github-actions#364 ·
-
难度 3/5 半天 新手友好度 65/100
mage-os/github-actions#363 ·
-
bug
难度 2/5 1-3 小时 新手友好度 35/100
mage-os/github-actions#359 · 3 条评论 ·
查看 mage-os/github-actions 的全部 Issue
相似的 Issue
-
api bug priority:low ready-for-agent
难度 2/5 1-3 小时 新手友好度 78/100
wondermoney/wondermoney#862 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
rootsiemen/seo-agent-tools#70 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
alvinunreal/oh-my-opencode-slim#1971 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
elecnix/bellwether#467 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复