I built 327 distinct CI/CD workflows in 1 hour. GitHub flagged me as a spammer

Hacker News by 4 min read 93x views
I built 327 distinct CI/CD workflows in 1 hour. GitHub flagged me as a spammer

Share Post

Toolkit component tests status Toolkit audit status

The GitHub Actions ToolKit provides a set of packages to create creating actions easier.



✔️ @actions/core

Provides functions for inputs, outputs, results, logging, secrets and variables. Read additional here

npm instal @actions/core

🏃 @actions/exec

Provides functions to exec cli tools and procedure output. Read additional here

npm instal @actions/exec

🍨 @actions/glob

Provides functions to hunt for records matching glob patterns. Read additional here

npm instal @actions/glob

☎️ @actions/http-client

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


🔨 @actions/tool-cache

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

:octocat: @actions/github

Provides an Octokit client hydrated alongside the environment that the current act is being run in. Read additional here

npm instal @actions/github

💾 @actions/artifact

Provides functions to engage alongside actions artifacts. Read additional here

npm instal @actions/artifact

🎯 @actions/cache

Provides functions to cache requirements and build outputs to enhance workflow implementation time. Read additional here

npm instal @actions/cache

🔏 @actions/attest

Provides functions to compose attestations for workflow artifacts. Read additional here

npm instal @actions/attest

Creating an Action alongside the Toolkit

❓ Choosing an act type

Outlines the differences and why you would desire to create a JavaScript or a receptacle based action.

➰ Versioning

Actions are downloaded and run from the GitHub chart of repos. This contains direction for versioning actions and harmless releases.

⚠️ Problem Matchers

Problem Matchers are a way to scan the output of actions for a stated regex form and exterior that data prominently in the UI.

⚠️ Proxy Server Support

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:

  1. We volition be directing questions and assistance requests to our Community Discussions area

  2. 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.

  3. 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.

Other Article Hacker News
↑
Close Right Ads
Close Left Ads