opsscript-gate 0.8.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/workflows/release.yml +24 -0
  2. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/CHANGELOG.md +6 -0
  3. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/CITATION.cff +1 -1
  4. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/PKG-INFO +6 -6
  5. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/README.md +5 -5
  6. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/README.zh-CN.md +4 -4
  7. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/docs/configuration.md +3 -3
  8. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/docs/gpt-oss.md +1 -1
  9. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/github-actions/README.md +1 -1
  10. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/github-actions/workflow.yml +1 -1
  11. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/pyproject.toml +1 -1
  12. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/__init__.py +1 -1
  13. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/config.py +1 -1
  14. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/runner.py +5 -1
  15. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/tests/test_runner.py +2 -0
  16. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.gitattributes +0 -0
  17. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  18. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/ISSUE_TEMPLATE/distro_request.yml +0 -0
  19. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  20. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/assets/social-preview.png +0 -0
  21. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/pull_request_template.md +0 -0
  22. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/workflow-templates/opsscript-gate.properties.json +0 -0
  23. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/workflow-templates/opsscript-gate.yml +0 -0
  24. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/workflows/demo.yml +0 -0
  25. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.github/workflows/test.yml +0 -0
  26. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/.gitignore +0 -0
  27. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/CONTRIBUTING.md +0 -0
  28. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/LICENSE +0 -0
  29. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/ROADMAP.md +0 -0
  30. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/SECURITY.md +0 -0
  31. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/action.yml +0 -0
  32. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/docs/troubleshooting.md +0 -0
  33. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/alpine-incompatibility/README.md +0 -0
  34. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/alpine-incompatibility/apt_dependency.sh +0 -0
  35. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/basic/README.md +0 -0
  36. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/basic/clean_setup.sh +0 -0
  37. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/interactive-hang/README.md +0 -0
  38. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/examples/interactive-hang/prompt_confirm.sh +0 -0
  39. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/cli.py +0 -0
  40. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/discovery.py +0 -0
  41. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/models.py +0 -0
  42. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/remediation.py +0 -0
  43. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/src/opsscript_gate/reporter.py +0 -0
  44. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/tests/fixtures/fail_deps.sh +0 -0
  45. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/tests/fixtures/fail_hang.sh +0 -0
  46. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/tests/fixtures/pass_basic.sh +0 -0
  47. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/tests/test_action_contract.py +0 -0
  48. {opsscript_gate-0.8.0 → opsscript_gate-0.8.1}/tests/test_onboarding.py +0 -0
@@ -190,6 +190,30 @@ jobs:
190
190
  files: dist/*
191
191
  generate_release_notes: true
192
192
 
193
+ - name: Check Marketplace listing freshness
194
+ if: steps.release-check.outputs.is_new_release == 'true'
195
+ shell: bash
196
+ env:
197
+ RELEASE_TAG: ${{ steps.release-check.outputs.release_tag }}
198
+ run: |
199
+ set -euo pipefail
200
+ listing_url="https://github.com/marketplace/actions/opsscript-gate"
201
+ listing="$(curl -fsSL "$listing_url")"
202
+ if grep -Fq "$RELEASE_TAG" <<<"$listing"; then
203
+ echo "Marketplace listing references $RELEASE_TAG."
204
+ exit 0
205
+ fi
206
+
207
+ echo "::warning::Marketplace listing is not yet showing $RELEASE_TAG. GitHub requires the release UI checkbox to publish an Action release."
208
+ {
209
+ echo "## Marketplace publication"
210
+ echo
211
+ echo "The release **$RELEASE_TAG** is live, but the Marketplace page has not caught up."
212
+ echo "Open the release editor, enable **Publish this Action to the GitHub Marketplace**, choose the categories, and save it."
213
+ echo
214
+ echo "[Open release editor](https://github.com/Mresyzz/opsscript-gate/releases/edit/${{ steps.release-check.outputs.release_tag }})"
215
+ } >> "$GITHUB_STEP_SUMMARY"
216
+
193
217
  publish-pypi:
194
218
  name: Publish to PyPI via OIDC
195
219
  needs: [test, build]
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.1] - 2026-10-02
4
+
5
+ ### Fixed
6
+ - Prevented Debian and Ubuntu image cleanup hooks from turning optional package setup into a false compatibility failure.
7
+ - Kept package installation and target script failures fail-closed while making ephemeral cache cleanup best-effort.
8
+
3
9
  ## [0.8.0] - 2026-10-02
4
10
 
5
11
  ### Added
@@ -5,7 +5,7 @@ type: software
5
5
  authors:
6
6
  - family-names: Mresyzz
7
7
  given-names: Mresy
8
- version: 0.8.0
8
+ version: 0.8.1
9
9
  date-released: 2026-10-02
10
10
  repository-code: https://github.com/Mresyzz/opsscript-gate
11
11
  url: https://github.com/Mresyzz/opsscript-gate
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: opsscript-gate
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Run Linux shell scripts in Debian, Ubuntu and Alpine containers to catch runtime compatibility failures before merge
5
5
  Project-URL: Homepage, https://mresyzz.github.io/InstallReady/
6
6
  Project-URL: Demo, https://mresyzz.github.io/InstallReady/?repo=Mresyzz%2Fopsscript-gate
@@ -56,7 +56,7 @@ Try the browser scanner: [InstallReady](https://mresyzz.github.io/InstallReady/?
56
56
 
57
57
  ---
58
58
 
59
- ## Current release: v0.8.0
59
+ ## Current release: v0.8.1
60
60
 
61
61
  The current release includes a project config file, a dry-run plan, presets, exclusions,
62
62
  saved reports, and changed-script selection for pull requests. The project controls
@@ -107,7 +107,7 @@ jobs:
107
107
  - uses: actions/checkout@v7
108
108
  with:
109
109
  persist-credentials: false
110
- - uses: Mresyzz/opsscript-gate@v0.8.0
110
+ - uses: Mresyzz/opsscript-gate@v0.8.1
111
111
  ```
112
112
 
113
113
  This zero-configuration form discovers shell scripts in the repository. Use
@@ -118,7 +118,7 @@ repository has a single installer. For self-hosted model installers, see the
118
118
  Or test a specific script with custom execution modes:
119
119
 
120
120
  ```yaml
121
- - uses: Mresyzz/opsscript-gate@v0.8.0
121
+ - uses: Mresyzz/opsscript-gate@v0.8.1
122
122
  with:
123
123
  script-path: scripts/install.sh
124
124
  shell: auto
@@ -150,7 +150,7 @@ unrelated scripts:
150
150
  with:
151
151
  persist-credentials: false
152
152
  fetch-depth: 0
153
- - uses: Mresyzz/opsscript-gate@v0.8.0
153
+ - uses: Mresyzz/opsscript-gate@v0.8.1
154
154
  with:
155
155
  changed-since: ${{ github.event.pull_request.base.sha }}
156
156
  preset: minimal
@@ -233,7 +233,7 @@ Use `sarif` when the result should appear in GitHub Code Scanning or another
233
233
  SARIF-compatible viewer. Upload it explicitly with the official upload action:
234
234
 
235
235
  ```yaml
236
- - uses: Mresyzz/opsscript-gate@v0.8.0
236
+ - uses: Mresyzz/opsscript-gate@v0.8.1
237
237
  with:
238
238
  script-path: scripts/install.sh
239
239
  format: sarif
@@ -26,7 +26,7 @@ Try the browser scanner: [InstallReady](https://mresyzz.github.io/InstallReady/?
26
26
 
27
27
  ---
28
28
 
29
- ## Current release: v0.8.0
29
+ ## Current release: v0.8.1
30
30
 
31
31
  The current release includes a project config file, a dry-run plan, presets, exclusions,
32
32
  saved reports, and changed-script selection for pull requests. The project controls
@@ -77,7 +77,7 @@ jobs:
77
77
  - uses: actions/checkout@v7
78
78
  with:
79
79
  persist-credentials: false
80
- - uses: Mresyzz/opsscript-gate@v0.8.0
80
+ - uses: Mresyzz/opsscript-gate@v0.8.1
81
81
  ```
82
82
 
83
83
  This zero-configuration form discovers shell scripts in the repository. Use
@@ -88,7 +88,7 @@ repository has a single installer. For self-hosted model installers, see the
88
88
  Or test a specific script with custom execution modes:
89
89
 
90
90
  ```yaml
91
- - uses: Mresyzz/opsscript-gate@v0.8.0
91
+ - uses: Mresyzz/opsscript-gate@v0.8.1
92
92
  with:
93
93
  script-path: scripts/install.sh
94
94
  shell: auto
@@ -120,7 +120,7 @@ unrelated scripts:
120
120
  with:
121
121
  persist-credentials: false
122
122
  fetch-depth: 0
123
- - uses: Mresyzz/opsscript-gate@v0.8.0
123
+ - uses: Mresyzz/opsscript-gate@v0.8.1
124
124
  with:
125
125
  changed-since: ${{ github.event.pull_request.base.sha }}
126
126
  preset: minimal
@@ -203,7 +203,7 @@ Use `sarif` when the result should appear in GitHub Code Scanning or another
203
203
  SARIF-compatible viewer. Upload it explicitly with the official upload action:
204
204
 
205
205
  ```yaml
206
- - uses: Mresyzz/opsscript-gate@v0.8.0
206
+ - uses: Mresyzz/opsscript-gate@v0.8.1
207
207
  with:
208
208
  script-path: scripts/install.sh
209
209
  format: sarif
@@ -10,9 +10,9 @@ Bash 依赖、包管理器假设和交互式阻塞。它与 ShellCheck 互补。
10
10
 
11
11
  也可以直接打开 [InstallReady 在线扫描器](https://mresyzz.github.io/InstallReady/?repo=Mresyzz%2Fopsscript-gate),无需登录即可检查公开仓库。
12
12
 
13
- ## 当前版本 v0.8.0
13
+ ## 当前版本 v0.8.1
14
14
 
15
- v0.8.0 已作为正式版本发布;如果你要从源码验证当前分支,也可以执行:
15
+ v0.8.1 已作为正式版本发布;如果你要从源码验证当前分支,也可以执行:
16
16
 
17
17
  ```bash
18
18
  pip install -e .
@@ -28,7 +28,7 @@ opsscript-gate run --dry-run
28
28
  opsscript-gate run --format json --output reports/compatibility.json
29
29
  ```
30
30
 
31
- `init` 生成配置和 GitHub 工作流,不覆盖已有文件。工作流引用 `v0.8.0`。
31
+ `init` 生成配置和 GitHub 工作流,不覆盖已有文件。工作流引用 `v0.8.1`。
32
32
  预览不需要 Docker;真实运行需要 Python 3.10+
33
33
  和可访问的 Linux Docker 引擎。
34
34
  `opsscript-gate doctor` 可以在真实运行前检查 Python 和 Docker。
@@ -65,7 +65,7 @@ Docker daemon 和可选的项目配置。
65
65
  - uses: actions/checkout@v7
66
66
  with:
67
67
  fetch-depth: 0
68
- - uses: Mresyzz/opsscript-gate@v0.8.0
68
+ - uses: Mresyzz/opsscript-gate@v0.8.1
69
69
  with:
70
70
  changed-since: ${{ github.event.pull_request.base.sha }}
71
71
  preset: minimal
@@ -12,7 +12,7 @@ opsscript-gate run --dry-run
12
12
  ```
13
13
 
14
14
  `init` refuses to overwrite either `.opsscript-gate.json` or
15
- `.github/workflows/opsscript-gate.yml`. The generated workflow uses the v0.8.0 tag.
15
+ `.github/workflows/opsscript-gate.yml`. The generated workflow uses the v0.8.1 tag.
16
16
 
17
17
  `doctor` checks Python and Docker connectivity without executing repository scripts.
18
18
  Use `opsscript-gate doctor --format json` when collecting a support report.
@@ -104,7 +104,7 @@ For pull requests, set `changed-since` to the base commit and fetch full Git his
104
104
  - uses: actions/checkout@v7
105
105
  with:
106
106
  fetch-depth: 0
107
- - uses: Mresyzz/opsscript-gate@v0.8.0
107
+ - uses: Mresyzz/opsscript-gate@v0.8.1
108
108
  with:
109
109
  changed-since: ${{ github.event.pull_request.base.sha }}
110
110
  preset: minimal
@@ -114,7 +114,7 @@ The Action passes when no changed shell scripts are selected. This keeps unrelat
114
114
  documentation or application changes from starting container jobs.
115
115
 
116
116
  ```yaml
117
- - uses: Mresyzz/opsscript-gate@v0.8.0
117
+ - uses: Mresyzz/opsscript-gate@v0.8.1
118
118
  with:
119
119
  config: .opsscript-gate.json
120
120
  format: json
@@ -33,7 +33,7 @@ jobs:
33
33
  fetch-depth: 0
34
34
  persist-credentials: false
35
35
 
36
- - uses: Mresyzz/opsscript-gate@v0.8.0
36
+ - uses: Mresyzz/opsscript-gate@v0.8.1
37
37
  with:
38
38
  changed-since: ${{ github.event.pull_request.base.sha }}
39
39
  preset: minimal
@@ -2,4 +2,4 @@
2
2
 
3
3
  This example shows a GitHub Actions workflow for checking a shell script on pull requests.
4
4
 
5
- Copy `workflow.yml` into your repository at `.github/workflows/script-gate.yml` and point `script-path` to the script you want to validate. The example uses the current v0.8.0 Action release.
5
+ Copy `workflow.yml` into your repository at `.github/workflows/script-gate.yml` and point `script-path` to the script you want to validate. The example uses the current v0.8.1 Action release.
@@ -19,7 +19,7 @@ jobs:
19
19
  persist-credentials: false
20
20
 
21
21
  - name: Run OpsScript Gate
22
- uses: Mresyzz/opsscript-gate@v0.8.0
22
+ uses: Mresyzz/opsscript-gate@v0.8.1
23
23
  with:
24
24
  script-path: 'scripts/deploy.sh'
25
25
  shell: auto
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "opsscript-gate"
7
- version = "0.8.0"
7
+ version = "0.8.1"
8
8
  description = "Run Linux shell scripts in Debian, Ubuntu and Alpine containers to catch runtime compatibility failures before merge"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -1,4 +1,4 @@
1
1
  """OpsScript Gate: Lightweight cross-distro compatibility pre-check for Linux ops scripts."""
2
2
 
3
- __version__ = "0.8.0"
3
+ __version__ = "0.8.1"
4
4
  __all__ = ["__version__"]
@@ -83,7 +83,7 @@ jobs:
83
83
  - uses: actions/checkout@v7
84
84
  with:
85
85
  persist-credentials: false
86
- - uses: Mresyzz/opsscript-gate@v0.8.0
86
+ - uses: Mresyzz/opsscript-gate@v0.8.1
87
87
  with:
88
88
  config: .opsscript-gate.json
89
89
  """,
@@ -589,11 +589,15 @@ def _wrap_with_package_setup(command: Sequence[str], packages: Sequence[str]) ->
589
589
  "if command -v apt-get >/dev/null 2>&1; then "
590
590
  "mkdir -p /tmp/opsscript-apt-archives/partial && "
591
591
  "apt-get -o APT::Sandbox::User=root "
592
+ "-o DPkg::Post-Invoke::= "
593
+ "-o APT::Update::Post-Invoke-Success::= "
592
594
  "-o Dir::Cache::archives=/tmp/opsscript-apt-archives/ update && "
593
595
  f"apt-get -o APT::Sandbox::User=root "
596
+ "-o DPkg::Post-Invoke::= "
597
+ "-o APT::Update::Post-Invoke-Success::= "
594
598
  "-o Dir::Cache::archives=/tmp/opsscript-apt-archives/ "
595
599
  f"install -y --no-install-recommends {package_args} && "
596
- "rm -rf /tmp/opsscript-apt-archives /var/lib/apt/lists/*; "
600
+ "(rm -rf /tmp/opsscript-apt-archives /var/lib/apt/lists/* || true); "
597
601
  "elif command -v apk >/dev/null 2>&1; then "
598
602
  f"apk add --no-cache {package_args}; "
599
603
  "else echo 'No supported package manager found (apt-get or apk)' >&2; exit 125; fi"
@@ -221,6 +221,8 @@ def test_run_on_distro_package_setup_wraps_command(tmp_path):
221
221
  command = mock_client.containers.create.call_args.kwargs["command"]
222
222
  assert command[:2] == ["/bin/sh", "-c"]
223
223
  assert "Dir::Cache::archives=/tmp/opsscript-apt-archives/" in command[2]
224
+ assert "DPkg::Post-Invoke::=" in command[2]
225
+ assert "APT::Update::Post-Invoke-Success::=" in command[2]
224
226
  assert "apk add --no-cache curl ca-certificates" in command[2]
225
227
  assert "exec /bin/sh -c" in command[2]
226
228
 
File without changes