npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@awlsring/cdktf-github-actions

v0.0.362

Published

This is a library to help define GitHub Actions workflows using CDKTF. This package vends constructs for defining a workflow that will be synthesized to a workflow yaml file in your repos `.github/workflows` directory.

Downloads

637

Readme

cdktf-github-actions

This is a library to help define GitHub Actions workflows using CDKTF. This package vends constructs for defining a workflow that will be synthesized to a workflow yaml file in your repos .github/workflows directory.

Development

This project is in early development. The constructs are likely to change as the needs of the project evolve.

A few items I'm currently working towards:

  • [ ] More github resource synthesis
  • [ ] Higher test coverage
  • [ ] More indepth documentation

Usage

Example

import { Construct } from 'constructs';
import { App, TerraformStack } from 'cdktf';
import { Workflow, Job } from 'cdktf-github-actions';

const app = new App();

class MyWorkflowStack executes TerraformStack {
  constructor(scope: Construct, name: string) {
    super(scope, name);

    let echoJob = new Job(this, 'build-job', {
      steps: [
        {
          name: 'echo',
          run: 'echo "Hello World"',
        },
      ],
    });

    const wf = new Workflow(this, 'workflow', {
      repoName: 'my-repo',
      jobs: [echoJob],
    });
  }
}

const stack = new MyWorkflowStack(app, 'test');
app.synth();

The constructs support the ability to define github resources and create them using the github terrafrom provider. The following example shows how to create a create a workflow with secrets that will be stored in the repository.

import { Construct } from 'constructs';
import { App, TerraformStack } from 'cdktf';
import { Workflow, Job } from 'cdktf-github-actions';

const app = new App();

class MyWorkflowStack executes TerraformStack {
  constructor(scope: Construct, name: string) {
    super(scope, name);

    let echoJob = new Job(this, 'build-job', {
      steps: [
        {
          name: 'echo',
          run: 'echo "Hello World"',
          withSecrets: [
            {
              referencedName: 'token',
              secretName: 'MY_SECRET',
              secretValue: '123',
            },
          ],
        },
      ],
    });

    const wf = new Workflow(this, 'workflow', {
      repoName: 'my-repo',
      jobs: [echoJob],
    });
  }
}

const stack = new MyWorkflowStack(app, 'test');
app.synth();

The example above will create a secret with the name MY_SECRET and the value 123 in the repository. The secret will be referenced in the workflow using the name token.