Toolverse
All skills

github-script

by githubnext

Best practices for writing JavaScript code for GitHub Actions using github-script

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
DevOps

About this skill

Best practices for writing JavaScript code for GitHub Actions using github-script

How to use

  1. Zapoznaj się z dostępnymi pakietami globalnymi: @actions/core i @actions/github są automatycznie dostępne w akcji actions/github-script@v8, nie musisz ich importować ani wymagać.

  2. Używaj funkcji logowania z pakietu @actions/core: zastosuj core.info(), core.warning() i core.error() zamiast console.log() czy console.error(). Jeśli chcesz oznaczyć akcję jako nieudaną, użyj core.setFailed() z komunikatem błędu.

  3. Zarządzaj wejściami i wyjściami akcji: pobieraj parametry wejściowe za pomocą core.getInput() (oznacz wymagane parametry atrybutem required: true), a wyniki ustawiaj funkcją core.setOutput(). Zmienne środowiskowe dla kolejnych kroków eksportuj przez core.exportVariable().

  4. Generuj podsumowanie kroku za pomocą core.summary.*: dodawaj zawartość Markdown funkcją core.summary.addRaw(), a na koniec wywołaj core.summary.write(), aby zapisać zmiany. Możesz łączyć wywołania w łańcuch.

  5. Unikaj typowych błędów: nie używaj typu any, zastąp go konkretnymi typami lub unknown. W bloku catch sprawdzaj, czy błąd jest instancją Error przed dostępem do właściwości message. Pamiętaj, że core.setFailed() automatycznie wywołuje core.error(), więc nie duplikuj tego wywołania.

  6. Sprawdź jakość kodu: uruchom make js do typowania TypeScript, make lint-cjs do lintowania i make fmt-cjs do formatowania pliku.

Related skills

senior-data-engineer

by davila7

World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, and data infrastructure. Expertise in Python, SQL, Spark, Airflow, dbt, Kafka, and modern data stack. Includes data modeling, pipeline orchestration, data quality, and DataOps. Use when

DevOps
1268

task-master

by sfc-gh-dflippo

AI-powered task management for structured, specification-driven development. Use this skill when you need to manage complex projects with PRDs, break down tasks into subtasks, track dependencies, and maintain organized development workflows across features and branches.

DevOps
14126

lambda

by itsmostafa

AWS Lambda serverless functions for event-driven compute. Use when creating functions, configuring triggers, debugging invocations, optimizing cold starts, setting up event source mappings, or managing layers.

DevOps
127

proxmox-full

by openclaw

Complete Proxmox VE management - create/clone/start/stop VMs and LXC containers, manage snapshots, backups, storage, and templates. Use when user wants to manage Proxmox infrastructure, virtual machines, or containers.

DevOps
1449

docker-containerization

by openclaw

This skill should be used when containerizing applications with Docker, creating Dockerfiles, docker-compose configurations, or deploying containers to various platforms. Ideal for Next.js, React, Node.js applications requiring containerization for development, production, or

DevOps
1334

pmbok-project-management

by jgtolentino

Comprehensive PMP/PMBOK project management methodologies and best practices. Use this skill when users need guidance on project management processes, templates, knowledge areas, process groups, tools, techniques, or certification preparation. Covers all 10 PMBOK Knowledge Areas

DevOps
21133