github-script
Write robust JavaScript for GitHub Actions github-script steps.
Works with
---
name: github-script
description: Write robust JavaScript for GitHub Actions github-script steps.
license: MIT
---
# GitHub Action Script Best Practices
Use these guidelines for JavaScript executed by `actions/github-script@v8`.
## Important Notes
- This action provides `@actions/core` and `@actions/github` packages globally
- Do not add import or require for `@actions/core`
- Reference documentation:
- https://github.com/actions/toolkit/blob/main/packages/core/README.md
- https://github.com/actions/toolkit/blob/main/packages/github/README.md
## Best Practices
- Use `core.info`, `core.warning`, `core.error` for logging, not `console.log` or `console.error`
- Use `core.setOutput` to set action outputs
- Use `core.exportVariable` to set environment variables for subsequent steps
- Use `core.getInput` to get action inputs, with `required: true` for mandatory inputs
- Use `core.setFailed` to mark the action as failed with an error message
## Step Summary
Use `core.summary.*` function to write output the step summary file.
- Use `core.summary.addRaw()` to add raw Markdown content (GitHub Flavored Markdown supported)
- Make sure to call `core.summary.write()` to flush pending writes
- Summary function calls can be chained, e.g. `core.summary.addRaw(...).addRaw(...).write()`
## Common Errors
- Avoid `any` type as much as possible, use specific types or `unknown` instead
- Catch handler: check if error is an instance of Error before accessing message property
```js
catch (error) {
core.setFailed(error instanceof Error ? error : String(error));
}
```
- `core.setFailed` also calls `core.error`, so do not call both
## Typechecking
Run `make js` to run the typescript compiler.
Run `make lint-cjs` to lint the files.
Run `make fmt-cjs` after editing to format the file.More Deployment & CI/CD skills
azure-enterprise-infra-planner
microsoft/azure-skills
Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.
azure-kubernetes-app-deploy
microsoft/azure-skills
Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.
finetuning
microsoft/azure-skills
Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

