Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/opsscript-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Installer compatibility

on:
pull_request:
paths:
- install.sh
- .goreleaser.yaml
- .github/workflows/opsscript-gate.yml
push:
branches: [main]
paths:
- install.sh
- .goreleaser.yaml
- .github/workflows/opsscript-gate.yml
Comment on lines +5 to +14

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Packaging changes skip the check. install.sh expects a specific archive name and folder layout, both set by .goreleaser.yaml. A change to that file alone can break the download or extraction, but neither path filter starts this workflow for it. Add .goreleaser.yaml to both filters.

Suggested change
paths:
- install.sh
- .github/workflows/opsscript-gate.yml
push:
branches: [main]
paths:
- install.sh
- .github/workflows/opsscript-gate.yml
paths:
- install.sh
- .goreleaser.yaml
- .github/workflows/opsscript-gate.yml
push:
branches: [main]
paths:
- install.sh
- .goreleaser.yaml
- .github/workflows/opsscript-gate.yml
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/opsscript-gate.yml
Line: 5-12

Comment:
**Packaging changes skip the check.** `install.sh` expects a specific archive name and folder layout, both set by `.goreleaser.yaml`. A change to that file alone can break the download or extraction, but neither path filter starts this workflow for it. Add `.goreleaser.yaml` to both filters.

```suggestion
    paths:
      - install.sh
      - .goreleaser.yaml
      - .github/workflows/opsscript-gate.yml
  push:
    branches: [main]
    paths:
      - install.sh
      - .goreleaser.yaml
      - .github/workflows/opsscript-gate.yml
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


permissions:
contents: read

jobs:
installer:
name: install.sh / ${{ matrix.image }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: debian:12-slim
id: debian-12-slim
- image: ubuntu:22.04
id: ubuntu-22-04
- image: ubuntu:24.04
id: ubuntu-24-04
- image: alpine:3.20
id: alpine-3-20

steps:
- name: Check out
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Add installation postcondition
shell: bash
run: |
{
printf '#!/bin/bash\n(\n'
cat install.sh
printf '\n)\ninstaller_status=$?\n[ "$installer_status" -eq 0 ] || exit "$installer_status"\n'
} > installer-smoke.sh
cat >> installer-smoke.sh <<'EOF'

# An installer exit code alone does not prove the binary was installed.
test -x "$HOME/.lsh/lsh" || { echo 'lsh was not installed' >&2; exit 1; }
"$HOME/.lsh/lsh" --version
EOF

- name: Check installer compatibility
uses: Mresyzz/opsscript-gate@v0.9.4
with:
script-path: installer-smoke.sh
matrix: ${{ matrix.image }}
network: bridge
packages: |
bash
curl
ca-certificates
tar
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
output: reports/opsscript-gate-${{ matrix.id }}.json

- name: Upload compatibility report
if: always()
uses: actions/upload-artifact@v4
with:
name: opsscript-gate-${{ matrix.id }}
path: reports/
if-no-files-found: ignore