Skip to content
Skills Library
DevOps & cloud · Building & coding

saleor-dashboard-github-workflows

/saleor-dashboard-github-workflows

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.

Licence
BSD-3-Clause
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

BSD-3-Clause, otwarta.

What it does and when to use it

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.

Original author 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.

How it works

  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
Original SKILL.md headings · 170 lines, 975 words
SKILL.md preview
---
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`.

Versions

The database has no other skills named saleor-dashboard-github-workflows.

Database snapshot: 13.11.2026 · package version d1be190695ad (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100review-ci
    Use when the user asks for a CI review, CI/CD review, GitHub Actions review, workflow review, pipeline review, build pipeline audit, "review the workflows", "review the actions", action pinning audit, workflow permissions audit, or supply-chain review of CI configuration.
  • 100github-actions-style
    GitHub Actions workflow and composite action conventions for MLflow. Use when writing, modifying, or reviewing workflows in .github/workflows/ or actions in .github/actions/ in this repository.
  • 100github-actions
    Use when adding CI/CD, creating workflows, auditing GitHub Actions, or fixing action pinning. Creates and audits workflows for SHA pinning and permissions.
  • 95authoring-ci-workflows
    Use when adding or editing a GitHub Actions workflow, composite action, or reusable workflow under `.github/` — new CI jobs, triggers, matrices, checkout/clone tuning, action pinning, GitHub App token auth, concurrency groups, `timeout-minutes`, `paths` filters, caching, or…
  • 100actions-authoring
    This skill should be used when writing, hardening, or optimizing GitHub Actions workflows — permissions, action pinning, script injection, caching, matrices, concurrency, and cost.
  • 90github-actions
    Apply when writing or editing any workflow, composite action, job, or step — and read the owner pointers before adding a rule. Esposter's GitHub Actions authoring for `.github/workflows` and `.github/actions`: how a step is written.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.