useblacksmith/stickydisk
legitimate disk mount utility
Action declares a main entrypointAction declares a post-job hook
SHA-256c6a78c35cb3abc7cd90eb6c7322a75643e274ae756afb14c981db903c0bf1140
Evidence
1All contributors and agents must follow the [repository guidelines](CLAUDE.md), including the customer privacy before publication policy.
1# Claude Code Assistant Guidelines
2
3This document contains important information for Claude when working on this codebase.
4
5## Pre-commit Checks
6
7**CRITICAL - MUST RUN BEFORE EVERY COMMIT**: The CI will fail if you don't run these commands before committing:
⋯15 lines
232. The dist/ folder is up-to-date with the source code (no uncommitted build changes)
24
25## Available Scripts
26
27- `npm run lint` - Runs ESLint to check code style and potential issues
28- `npm run build` - Builds the TypeScript code and creates distribution files
29- `npm test` - Runs the test suite (currently empty)
30
31## Code Style Guidelines
32
331. **Array Types**: Use `T[]` syntax instead of `Array<T>` (enforced by ESLint)
342. **TypeScript**: All source code should be i …
35:47… build`) after making changes to ensure dist/ files are updated
36
37## Project Structure
38
39- `src/` - Source TypeScript files
40 - `main.ts` - Main action entry point
41 - `post.ts` - Post-action cleanup
42 - `job-status.ts` - Maps the job status input …
1{"version":3,"file":"index.cjs","sources":["../src/main.ts"],"sourcesContent":["import { getInput, setFailed, info } from \"@actions/core\";\nimport fetch from \"node-fetch\";\n\nasync function run(): Promise<void> {\n try {\n const cacheKey = getInput(\"key\", { required: true });\n const cacheVersion = getInput(\"version\"); // optional\n\n const baseUrl =\n process.env.BLACKSMITH_CACHE_URL ||\n (process.env.PETNAME?.includes(\"staging\")\n ? \"https://stagingapi.blacksmith.sh/cache\"\n : \"https://api.blacksmith.sh/cache\");\n\n const resource = cacheVersion ? `${cacheKey}/${cacheVersion}` : cacheKey;\n const url = `${baseUrl}/${resource}`;\n\n const response = await fetch(url, {\n method: \"DELETE\",\n headers: {\n Accept: \"application/json; version=6.0-preview.1\",\n \"X-Github-Repo-Name\": process.env[\"GITHUB_REPO_NAME\"] ?? \"\",\n Authorization: `Bearer ${process.env[\"BLACKSMITH_CACHE_TOKEN\"]}`,\n \"X-Cache-Region\": process.env[\"BLACKSMITH_REGION\"] ?? \"eu-central\",\n …
1import fsPromises from 'node:fs/promises';
2import 'node:fs';
3import os from 'node:os';
4import 'node:path';
5
6/**
7 * Retrieves the value of a GitHub Actions input.
8 *
9 * @param name - The name of the GitHub Actions input.
10 * @returns The value of the GitHub Actions input, or an empty string if not found.
11 */
12function getInput(name) {
13 const value = process.env[`INPUT_${name.toUpperCase()}`] ?? "";
14 return value.trim();
⋯7 lines
22function logError(err) {
23 const message = err instanceof Error ? err.message : String(err);
24 process.stdout.write(`::error::${message}${os.EOL}`);
25}
26
27try {
28 const path = getInput("path");
29 await fsPromises.mkdir(path, { recursive: true });
30}
31catch (err) {
32 logError(err);
33 process.exitCode = 1;
34}
Showing the top 5 files — 2 more files (17 regions) not shown.
No evidence locations were recorded for this file. Raw result