The GitHub Actions ToolKit provides a set of packages to create creating actions easier.
Provides functions for inputs, outputs, results, logging, secrets and variables. Read additional here
npm instal @actions/core
Provides functions to exec cli tools and procedure output. Read additional here
npm instal @actions/exec
Provides functions to hunt for records matching glob patterns. Read additional here
npm instal @actions/glob
A lightweight HTTP client optimized for construction actions. Read additional here
npm instal @actions/http-client
✏️ @actions/io
Provides disk i/o functions akin cp, mv, rmRF, which etc. Read additional here
Provides functions for downloading and caching tools. e.g. setup-* actions. Read additional here
See @actions/cache for caching workflow dependencies.
npm instal @actions/tool-cache
Provides an Octokit client hydrated alongside the environment that the current act is being run in. Read additional here
npm instal @actions/github
Provides functions to engage alongside actions artifacts. Read additional here
npm instal @actions/artifact
Provides functions to cache requirements and build outputs to enhance workflow implementation time. Read additional here
npm instal @actions/cache
Provides functions to compose attestations for workflow artifacts. Read additional here
npm instal @actions/attest
Outlines the differences and why you would desire to create a JavaScript or a receptacle based action.
Actions are downloaded and run from the GitHub chart of repos. This contains direction for versioning actions and harmless releases.
Problem Matchers are a way to scan the output of actions for a stated regex form and exterior that data prominently in the UI.
Self-hosted runners can be configured to run rearward proxy servers.
Illustrates how to create a uncomplicated hello earth javascript action.
... const nameToGreet = core.getInput('who-to-greet'); console.log(`Hello ${nameToGreet}!`); ...
Walkthrough and template for creating a JavaScript Action alongside tests, linting, workflow, publishing, and versioning.
async function run() { try { const ms = core.getInput('milliseconds'); console.log(`Waiting ${ms} milliseconds ...`) ...
PASS ./index.test.js ✓ throws invalid number ✓ wait 500 ms ✓ test runs Test Suites: 1 passed, 1 total Tests: 3 passed, 3 total
Walkthrough creating a TypeScript Action alongside compilation, tests, linting, workflow, publishing, and versioning.
import * as core from '@actions/core'; async function run() { try { const ms = core.getInput('milliseconds'); console.log(`Waiting ${ms} milliseconds ...`) ...
PASS ./index.test.js ✓ throws invalid number ✓ wait 500 ms ✓ test runs Test Suites: 1 passed, 1 total Tests: 3 passed, 3 total
Create an act that is delivered as a receptacle and run alongside docker.
FROM alpine:3.10 COPY LICENSE README.md / COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] Create an act that is delivered as a receptacle which uses the toolkit. This example uses the GitHub environment to build an Octokit client.
FROM node:slim COPY . . RUN npm instal --production ENTRYPOINT ["node", "/lib/main.js"] const myInput = core.getInput('myInput'); core.debug(`Hello ${myInput} from inner a container`); const context = github.context; console.log(`We can equal get environment data, akin the repo: ${context.repo.repo}`)
Thank you for your involvement in this GitHub repo, however, correct now we are not taking contributions.
We continue to concentration our resources on strategic areas that assistance our customers be prosperous during making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards another areas of Actions and are not taking contributions to this repository at this time. The GitHub community roadmap is the finest location to prosecute alongside for any updates on features we’re operating on and what phase they’re in.
We are taking the following steps to improved straightforward requests connected to GitHub Actions, including:
-
We volition be directing questions and assistance requests to our Community Discussions area
-
High Priority bugs can be reported through Community Discussions or you can study these to our assistance squad https://support.github.com/contact/bug-report.
-
Security Issues have to be handled as per our security.md.
We volition motionless provision safety updates for this project and fix important breaking changes during this time.
You are greeted to motionless lift bugs in this repo.
See our code of conduct.
