Przejdź do treści
Biblioteka skilli
DevOps i chmura · Budowanie i kod

saleor-dashboard-github-workflows

/saleor-dashboard-github-workflows

Pisze i przegląda workflowy GitHub Actions w repozytorium Saleor Dashboard: obrazy runnerów, przypinanie akcji, uprawnienia i bramkę actionlint.

Licencja
BSD-3-Clause
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

BSD-3-Clause, otwarta.

Co robi i kiedy

Pisze i przegląda workflowy GitHub Actions w repozytorium Saleor Dashboard: obrazy runnerów, przypinanie akcji, uprawnienia i bramkę actionlint.

Oryginalny opis (EN)

Rules for writing and editing GitHub Actions workflows and composite actions in this repository - runner images, action pinning, shell quoting, untrusted interpolation, permissions, and the actionlint gate. Use when creating or changing anything under .github/workflows/ or .github/actions/, when a workflow review comment needs applying, or when a CI job needs adding to the repo.

Jak działa

  1. Non-negotiable: actionlint must pass
  2. Never interpolate ${{ }} into a run: block
  3. Quote every expansion, and build optional arguments as an array
  4. Pin actions by commit SHA, with the version in a trailing comment
  5. Runner images
  6. Permissions
  7. Prefer an expression to a job
  8. Checklist before handing back
  9. Repository specifics
Sekcje z nagłówków SKILL.md, w oryginale · 170 linii, 975 słów
Podgląd SKILL.md
---
name: saleor-dashboard-github-workflows
description: Rules for writing and editing GitHub Actions workflows and composite actions in this repository - runner images, action pinning, shell quoting, untrusted interpolation, permissions, and the actionlint gate. Use when creating or changing anything under .github/workflows/ or .github/actions/, when a workflow review comment needs applying, or when a CI job needs adding to the repo.
---

# GitHub Actions in saleor-dashboard

Workflows are the one place where a mistake runs with repository credentials
against every pull request. The rules below are what review asks for here, so
apply them while writing rather than after the comment arrives.

## Non-negotiable: actionlint must pass

`actionlint` runs shellcheck over every `run:` block, type-checks `${{ }}`
expressions, validates `runs-on` labels, and catches `needs`/`matrix` references
that do not resolve. **Run it before handing work back.**

```bash
pnpm run actionlint .github/workflows/your-file.yml   # one file
pnpm run actionlint                                   # every workflow
```

Nothing to install: the script runs the author's official image, pinned by digest
in `package.json`, and Docker is already a prerequisite for `pnpm e2e`. The image
bundles its own shellcheck, so results do not vary with what is on the host.

There is no usable npm distribution — the `actionlint` and `node-actionlint`
packages are unrelated 2022 forks that predate `ubuntu-24.04` as a known runner
label, so they would reject workflows that are in fact correct. If you want a
native binary for editor integration, `brew install actionlint` — but the
`package.json` script is what CI runs, so it is the one that decides.

`lint-workflows.yml` enforces this in CI, but only on the workflow files a pull
request **touches** — the repository predates the check and its older workflows
still carry findings. Editing a workflow means inheriting whatever it already
reports. Budget for that; do not silence it with `# actionlint-disable`.

Two gotchas:

- A `run:` comment whose first word is `shellcheck` is parsed as a shellcheck
  directive and fails the lint. Reword the comment.
- Do not write `pnpm run actionlint -- <files>`. pnpm forwards the `--` to the
  script, where it is an end-of-options marker, so the next argument is read as a
  file name. Pass arguments directly: `pnpm run actionlint <files>`.

## Never interpolate `${{ }}` into a `run:` block

`${{ }}` is substituted textually _before_ the shell starts, so anything an
outside contributor controls — a branch name, a PR title, a `workflow_dispatch`
input — becomes shell source. Pass it through `env:` instead, where it is only
ever a variable value.

```yaml
# Wrong - the value is spliced into the script
- run: node e2e/run.ts --target=${{ matrix.target }}

# Right
- env:
    E2E_TARGET: ${{ matrix.target }}
  run: node e2e/run.ts --target="$E2E_TARGET"
```

`${{ }}` is fine in `with:`, `if:`, `env:` and `name:` — those are not shell.

## Quote every expansion, and build optional arguments as an array

Unquoted `$VAR` word-splits, so a value containing a space silently becomes two
arguments. `${VAR:+--flag "$VAR"}` does _not_ solve this: the quotes inside the
expansion are not re-evaluated.

```yaml
# Wrong - a grep value with a space becomes two arguments
run: playwright test ${GREP:+--grep "$GREP"}

# Right
run: |
  args=()
  if [[ -n "$GREP" ]]; then
    args+=( --grep "$GREP" )
  fi
  playwright test "${args[@]}"
```

## Pin actions by commit SHA, with the version in a trailing comment

```yaml
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
```

A tag can be moved; a SHA cannot. Resolve one with:

```bash
gh api repos/actions/checkout/releases/latest -q .tag_name
gh api repos/actions/checkout/git/ref/tags/v7.0.1 -q .object.sha
```

If `.object.type` comes back `tag` rather than `commit` (an annotated tag, as
`pnpm/action-setup` uses), dereference it:

```bash
gh api repos/pnpm/action-setup/git/tags/<sha> -q .object.sha
```

**Start new workflows on current versions.** Parts of this repository still pin
older majors; copying an existing step forward carries the staleness with it,
and review flags it. Check the latest release rather than grepping a neighbour.

When a tool has no action, download a **pinned release** and verify its digest
rather than piping a script from a branch:

```yaml
env:
  TOOL_VERSION: 1.7.12
  TOOL_SHA256: 8aca8db9...
run: |
  curl -fsSL -o tool.tar.gz "https://github.com/owner/tool/releases/download/v${TOOL_VERSION}/..."
  echo "${TOOL_SHA256}  tool.tar.gz" | sha256sum --check --strict
```

A container image is the same idea: pin it by digest, and **write the registry
host out in full**. `rhysd/actionlint` resolves under Docker, which assumes
Docker Hub, but not under Podman, which does not guess a namespace it does not
know. `docker.io/rhysd/actionlint:1.7.12@sha256:...` works under both.

## Runner images

Use `ubuntu-24.04`. `ubuntu-22.04` is deprecated and being retired; much of this
repository still names it, which is drift rather than a pattern to copy. Pin the
version instead of `ubuntu-latest` so a runner rollout cannot change a run's
behaviour without a commit.

## Permissions

Declare `permissions: {}` at the top level and grant each job only what it
needs. A job that just reads code wants `contents: read`. Add
`persist-credentials: false` to `actions/checkout` unless a later step actually
pushes.

## Prefer an expression to a job

A job costs a runner allocation. Expanding an input into a matrix, or picking
between two constants, belongs in an expression:

```yaml
# Instead of a `resolve-targets` job that echoes to $GITHUB_OUTPUT
matrix:
  target: ${{ fromJSON((inputs.target == 'stable' || inputs.target == 'main') &&
    format('["{0}"]', inputs.target) || '["stable","main"]') }}
```

GitHub's `&&` and `||` return operand values, not booleans, which is what makes
the ternary-style form work.

## Checklist before handing back

- [ ] `actionlint` clean on every file touched
- [ ] `pnpm exec oxfmt --write` on the YAML
- [ ] No `${{ }}` inside any `run:` block
- [ ] Every shell expansion quoted; optional arguments built as an array
- [ ] Actions pinned by SHA, on the current release, version in a comment
- [ ] `runs-on: ubuntu-24.04`
- [ ] Top-level `permissions: {}` plus a per-job grant
- [ ] `concurrency` group set, so superseded pushes cancel
- [ ] `timeout-minutes` set, so a hung job does not burn an hour

## Repository specifics

- Reusable composite actions live in `.github/actions/<name>/action.yml`.
- Node and pnpm versions come from `package.json` (`engines`, `packageManager`);
  use `node-version-file: "package.json"` and let `pnpm/action-setup` read
  `packageManager` rather than naming versions in the workflow.
- The E2E suites are `e2e/` (local Docker stack, `e2e-local.yml`) and the frozen
  `e2e-legacy/` (Saleor Cloud). See `e2e/README.md`.

Wersje

W bazie nie ma innych skilli o nazwie saleor-dashboard-github-workflows.

Migawka bazy z 13.11.2026 · wersja paczki d1be190695ad (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100review-ci
    Przegląda konfigurację CI/CD: GitHub Actions, workflow, uprawnienia, przypinanie akcji i bezpieczeństwo łańcucha dostaw.
  • 100github-actions-style
    Stosuje konwencje projektu MLflow przy pisaniu i zmienianiu workflow w .github/workflows oraz akcji w .github/actions.
  • 100github-actions
    Tworzy i audytuje workflow GitHub Actions pod kątem przypinania akcji do SHA oraz minimalnych uprawnień.
  • 95authoring-ci-workflows
    Pomaga dodawać i edytować workflow GitHub Actions, akcje kompozytowe i reużywalne workflow według konwencji PostHog: triggery, macierze, przypinanie akcji, współbieżność, cache i wybór runnerów.
  • 100actions-authoring
    Pomaga pisać, utwardzać i optymalizować workflow GitHub Actions: uprawnienia, przypinanie akcji, cache, matrix, concurrency i koszty.
  • 90github-actions
    Opisuje zasady pisania workflow, akcji kompozytowych, jobów i kroków GitHub Actions w katalogach .github/workflows i .github/actions projektu Esposter.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.