Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate pnpm hardening
name: Validate pnpm config

on:
workflow_call: {}
Expand All @@ -8,7 +8,7 @@ permissions:

jobs:
require-pnpm-files:
name: Require pnpm lockfile and workspace file
name: Validate pnpm config - Require pnpm lockfile and workspace file
runs-on: ubuntu-latest
outputs:
pnpm_workspace_changed: ${{ steps.workspace_files.outputs.any_changed }}
Expand All @@ -32,11 +32,11 @@ jobs:
root="${GITHUB_WORKSPACE}"
missing=0
if [[ ! -f "${root}/pnpm-lock.yaml" ]]; then
echo "::error title=pnpm hardening::Missing pnpm-lock.yaml at the repository root (expected next to package.json)."
echo "::error title=validate pnpm config::Missing pnpm-lock.yaml at the repository root (expected next to package.json)."
missing=1
fi
if [[ ! -f "${root}/pnpm-workspace.yaml" ]]; then
echo "::error title=pnpm hardening::Missing pnpm-workspace.yaml at the repository root."
echo "::error title=validate pnpm config::Missing pnpm-workspace.yaml at the repository root."
missing=1
fi
if [[ "${missing}" -ne 0 ]]; then
Expand All @@ -45,7 +45,7 @@ jobs:
echo "pnpm-lock.yaml and pnpm-workspace.yaml are present."

validate-pnpm-workspace:
name: Validate pnpm-workspace.yaml policy
name: Validate pnpm config - Validate pnpm-workspace.yaml policy
runs-on: ubuntu-latest
needs: require-pnpm-files
if: needs.require-pnpm-files.outputs.pnpm_workspace_changed == 'true'
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
)

for msg in errors:
print(f"::error title=pnpm hardening::{msg}")
print(f"::error title=validate pnpm config::{msg}")

if errors:
print(f"\nValidation failed with {len(errors)} error(s).", file=sys.stderr)
Expand Down
Loading