mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2026-11-16 19:40:57 +00:00
The buildah-image container mode hardcoded /var/lib/containers/storage
as the volume mount path. This is the rootful storage location and
fails with "permission denied" when the runner operates as a non-root
user (rootless podman stores data elsewhere).
Query `podman info --format '{{.Store.GraphRoot}}'` at runtime to
discover the actual storage root. Falls back to the previous hardcoded
path with a warning if detection fails.
Also adds vitest and unit tests for the container mode logic, and a
test job in CI.
Closes #174
Co-authored-by: Claude Opus 4.6 <[email protected]>
56 lines
2 KiB
JavaScript
56 lines
2 KiB
JavaScript
import js from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [
|
|
"node_modules/",
|
|
"dist/",
|
|
"out/",
|
|
"lib/",
|
|
"eslint.config.mjs",
|
|
"vitest.config.ts",
|
|
"src/**/*.test.ts",
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommendedTypeChecked,
|
|
{
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
// Match the project's existing style
|
|
|
|
// TypeScript rules
|
|
"@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true }],
|
|
"@typescript-eslint/no-floating-promises": "error",
|
|
"@typescript-eslint/no-inferrable-types": ["error", { ignoreParameters: true }],
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/prefer-for-of": "error",
|
|
|
|
// Disable rules that conflict with the existing codebase
|
|
"@typescript-eslint/no-require-imports": "error",
|
|
"@typescript-eslint/no-shadow": "error",
|
|
"no-shadow": "off",
|
|
|
|
// Core rules matching existing style
|
|
"eqeqeq": ["error", "smart"],
|
|
"no-console": "error",
|
|
"curly": "error",
|
|
"no-constructor-return": "error",
|
|
|
|
// Disable rules that would require extensive refactoring
|
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
"@typescript-eslint/no-unsafe-call": "off",
|
|
"@typescript-eslint/no-unsafe-argument": "off",
|
|
"@typescript-eslint/no-unsafe-return": "off",
|
|
"@typescript-eslint/restrict-template-expressions": "off",
|
|
"@typescript-eslint/no-base-to-string": "off",
|
|
},
|
|
},
|
|
);
|