|
1 | | -# CodeSandbox-Kali-TMux-Patcher |
| 1 | +# CodeSandbox-Kali-TMux-PatcherREADME |
| 2 | +Code of conduct |
| 3 | +MIT license |
| 4 | +Security |
| 5 | + |
| 6 | + |
| 7 | +Toolkit unit tests status Toolkit audit status |
| 8 | + |
| 9 | +GitHub Actions Toolkit |
| 10 | +The GitHub Actions ToolKit provides a set of packages to make creating actions easier. |
| 11 | + |
| 12 | + |
| 13 | +Get started with the javascript-action template! |
| 14 | + |
| 15 | +Packages |
| 16 | +✔️ @actions/core |
| 17 | + |
| 18 | +Provides functions for inputs, outputs, results, logging, secrets and variables. Read more here |
| 19 | + |
| 20 | +$ npm install @actions/core |
| 21 | + |
| 22 | +🏃 @actions/exec |
| 23 | + |
| 24 | +Provides functions to exec cli tools and process output. Read more here |
| 25 | + |
| 26 | +$ npm install @actions/exec |
| 27 | + |
| 28 | +🍨 @actions/glob |
| 29 | + |
| 30 | +Provides functions to search for files matching glob patterns. Read more here |
| 31 | + |
| 32 | +$ npm install @actions/glob |
| 33 | + |
| 34 | +☎️ @actions/http-client |
| 35 | + |
| 36 | +A lightweight HTTP client optimized for building actions. Read more here |
| 37 | + |
| 38 | +$ npm install @actions/http-client |
| 39 | + |
| 40 | +✏️ @actions/io |
| 41 | + |
| 42 | +Provides disk i/o functions like cp, mv, rmRF, which etc. Read more here |
| 43 | + |
| 44 | +$ npm install @actions/io |
| 45 | + |
| 46 | +🔨 @actions/tool-cache |
| 47 | + |
| 48 | +Provides functions for downloading and caching tools. e.g. setup-* actions. Read more here |
| 49 | + |
| 50 | +See @actions/cache for caching workflow dependencies. |
| 51 | + |
| 52 | +$ npm install @actions/tool-cache |
| 53 | + |
| 54 | +:octocat: @actions/github |
| 55 | + |
| 56 | +Provides an Octokit client hydrated with the context that the current action is being run in. Read more here |
| 57 | + |
| 58 | +$ npm install @actions/github |
| 59 | + |
| 60 | +💾 @actions/artifact |
| 61 | + |
| 62 | +Provides functions to interact with actions artifacts. Read more here |
| 63 | + |
| 64 | +$ npm install @actions/artifact |
| 65 | + |
| 66 | +🎯 @actions/cache |
| 67 | + |
| 68 | +Provides functions to cache dependencies and build outputs to improve workflow execution time. Read more here |
| 69 | + |
| 70 | +$ npm install @actions/cache |
| 71 | + |
| 72 | +🔏 @actions/attest |
| 73 | + |
| 74 | +Provides functions to write attestations for workflow artifacts. Read more here |
| 75 | + |
| 76 | +$ npm install @actions/attest |
| 77 | + |
| 78 | +Creating an Action with the Toolkit |
| 79 | +❓ Choosing an action type |
| 80 | + |
| 81 | +Outlines the differences and why you would want to create a JavaScript or a container based action. |
| 82 | + |
| 83 | + |
| 84 | +➰ Versioning |
| 85 | + |
| 86 | +Actions are downloaded and run from the GitHub graph of repos. This contains guidance for versioning actions and safe releases. |
| 87 | + |
| 88 | + |
| 89 | +⚠️ Problem Matchers |
| 90 | + |
| 91 | +Problem Matchers are a way to scan the output of actions for a specified regex pattern and surface that information prominently in the UI. |
| 92 | + |
| 93 | + |
| 94 | +⚠️ Proxy Server Support |
| 95 | + |
| 96 | +Self-hosted runners can be configured to run behind proxy servers. |
| 97 | + |
| 98 | + |
| 99 | +Hello World JavaScript Action |
| 100 | +Illustrates how to create a simple hello world javascript action. |
| 101 | + |
| 102 | +... |
| 103 | + const nameToGreet = core.getInput('who-to-greet'); |
| 104 | + console.log(`Hello ${nameToGreet}!`); |
| 105 | +... |
| 106 | + |
| 107 | +JavaScript Action Walkthrough |
| 108 | +Walkthrough and template for creating a JavaScript Action with tests, linting, workflow, publishing, and versioning. |
| 109 | + |
| 110 | +async function run() { |
| 111 | + try { |
| 112 | + const ms = core.getInput('milliseconds'); |
| 113 | + console.log(`Waiting ${ms} milliseconds ...`) |
| 114 | + ... |
| 115 | +PASS ./index.test.js |
| 116 | + ✓ throws invalid number |
| 117 | + ✓ wait 500 ms |
| 118 | + ✓ test runs |
| 119 | + |
| 120 | +Test Suites: 1 passed, 1 total |
| 121 | +Tests: 3 passed, 3 total |
| 122 | + |
| 123 | +TypeScript Action Walkthrough |
| 124 | +Walkthrough creating a TypeScript Action with compilation, tests, linting, workflow, publishing, and versioning. |
| 125 | + |
| 126 | +import * as core from '@actions/core'; |
| 127 | + |
| 128 | +async function run() { |
| 129 | + try { |
| 130 | + const ms = core.getInput('milliseconds'); |
| 131 | + console.log(`Waiting ${ms} milliseconds ...`) |
| 132 | + ... |
| 133 | +PASS ./index.test.js |
| 134 | + ✓ throws invalid number |
| 135 | + ✓ wait 500 ms |
| 136 | + ✓ test runs |
| 137 | + |
| 138 | +Test Suites: 1 passed, 1 total |
| 139 | +Tests: 3 passed, 3 total |
| 140 | + |
| 141 | + |
| 142 | +Docker Action Walkthrough |
| 143 | +Create an action that is delivered as a container and run with docker. |
| 144 | + |
| 145 | +FROM alpine:3.10 |
| 146 | +COPY LICENSE README.md / |
| 147 | +COPY entrypoint.sh /entrypoint.sh |
| 148 | +ENTRYPOINT ["/entrypoint.sh"] |
| 149 | + |
| 150 | + |
| 151 | +Docker Action Walkthrough with Octokit |
| 152 | +Create an action that is delivered as a container which uses the toolkit. This example uses the GitHub context to construct an Octokit client. |
| 153 | + |
| 154 | +FROM node:slim |
| 155 | +COPY . . |
| 156 | +RUN npm install --production |
| 157 | +ENTRYPOINT ["node", "/lib/main.js"] |
| 158 | + |
| 159 | +const myInput = core.getInput('myInput'); |
| 160 | +core.debug(`Hello ${myInput} from inside a container`); |
| 161 | + |
| 162 | +const context = github.context; |
| 163 | +console.log(`We can even get context data, like the repo: ${context.repo.repo}`) |
| 164 | + |
| 165 | +Contributing |
| 166 | +We welcome contributions. See how to contribute. |
| 167 | + |
| 168 | +Code of Conduct |
| 169 | +See our code of conduct. |
0 commit comments