Giter Site home page Giter Site logo

jonaspammer / cookiecutter-github-action-typescript Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 454 KB

An awesome CookieCutter for creating Javascript based GitHub Action.

License: MIT License

JavaScript 15.60% TypeScript 42.11% Dockerfile 39.03% Shell 3.26%
cookiecutter-template github-action

cookiecutter-github-action-typescript's Introduction

CookieCutter GitHub Action TypeScript

CI Status

Awesome Cookiecutter template for creating universal NodeJS-based GitHub Actions using TypeScript.

Primary Features

At-a-glance

  • Formatting with prettier

  • Extensive Linting with eslint

  • Git hooks that run all the above with pre-commit



Usage

First, get Cruft. It’s a tool built in Cookiecutter that will allow you to keep up-to-date with the changes made to this cookiecutter.

$ python3 -m pip install cruft

Now run it against this repo:

$ cruft create https://github.com/JonasPammer/cookiecutter-github-action-typescript.git

Answer the prompts with your own desired options.

Enter the project and take a look around (replace "my-github-action" with your project slug):

$ cd my-github-action
~/my-github-action$ ls

Create a git repo and push it there (replace "YourGitHubName" with your github profile name and "my-github-action" with your project slug):

~/my-github-action$ git init
~/my-github-action$ git add .
~/my-github-action$ git commit -m "chore: create from cookiecutter"
~/my-github-action$ git remote add origin [email protected]:YourGitHubName/my-github-action.git
~/my-github-action$ git push -u origin master

Now take a look at your repo. Don’t forget to carefully look at the generated README - It contains all relevant Development Documentation.

Awesome, right?

ℹ️
This CookieCutter contains examplatory code snippets. Things that definetily need to be replaced or can be removed by you are commented with FIXME.
ℹ️
This CookieCutter does not configure your GitHub Repository. Please read the notes found in this README and perform the documented manual steps (e.g., Creating GitHub Action Secrets).

Generic Features of this 🍪

I maintain several CookieCutter’s. Many of them share a similiar set of boilerplate files. You will find this section to be the same in most of them.

Documentation

  • Includes an Awesome README

    ℹ️

    Because github/markup#1095 (support include directives for other asciidoc files) is still not fixed, the following measures were taken:

    • README.orig.adoc is the actual README that must be edited.
      A GitHub Workflow takes care of generating the actual README.adoc using the official tool ascidoctor-reducer.

    • [optional] The README also exists as an automatically published GitHub Page, of which the HTML was generated by Asciidoctor (= done right).

      ℹ️

      For this to work, you need to activate the Pages feature on a per-repository basis.

      To do so, go to the Settings page of your GitHub repository. Under Pages / Source, select [gh-pages] [/ (root)], and click Save.

  • Includes a Beginner-Friendly Development Documentation file

  • Includes a Beginner-Friendly generic Contribution Documentation file, inspired by Auth0’s Open Source Template.

  • Includes a generic security policy file that states that only the current major version of the project is actively supported with patches and that problems should be sent to the e-mail address specified when the cookiecutter was created. The file also contains a template that may be used for such inqueries.

Development

  • Assumes MIT License.

  • Changelog is assumed to be managed through the use of GitHub Releases.

  • Includes numerous pre-commit hooks to automatically find linting issues, format your files, and find common issues of version control and source code

  • Includes a very much standard yamllint configuration (enforced through pre-commit and checked by CI)

  • Assumes enforcement of Conventional Commit (checked by a pre-commit hook if activated)

    The resulting projects mentions that this is completely optional for casual contributors, as it is assumed that pull requests are squash-merged by maintainers.

  • Includes a exhaustive .gitignore file generated by gitignore.io

  • Includes a copy of the Contributor Covenant Code of Conduct as generated automatically by GitHub.

GitHub

ℹ️

The resulting projects mentions that pre-commit installation is optional, as it is assumed that the project is included in your pre-commit.ci account projects.

  • Includes a .gitattributes file, ensuring LF line endings

  • Includes GitHub Issue Form Templates for filing bug reports and feature requests using HTML forms

  • Includes a GitHub Pull Request Template

  • Includes a GitHub Workflow to denote size of pull requests by automagically labelling them

  • Includes a pretty standard Renovate configuration file for dependency update automation (similiar to dependabot, but better).

    ℹ️

    To enable Renovate, you need to enable it for your repositories, e.g. by using the recommended Way of installing the Renovate GitHub App to your GitHub profile (for free)!

  • Includes a GitHub Workflow to declaratively manage labels

    • The predefined labels definition is inspired by the kubernetes project

cookiecutter-github-action-typescript's People

Contributors

dependabot[bot] avatar jonaspammer avatar pre-commit-ci[bot] avatar renovate[bot] avatar

Watchers

 avatar

Forkers

lgtm-migrator

cookiecutter-github-action-typescript's Issues

refactor(ci): try out renovate

https://github.com/renovatebot/renovate

found through https://gitea.com/gitea/awesome-gitea, which in turn I found after digging through gitea documentation/changelog after having read about a new major and very intriguingly awesome gitea update on heise's IT news ticker (docker registry capability and many more awesome features that make it potentially actually viable for some scenarios) got me interested in gitea

the tldr/medium blog post from some very random dude found on my first google search result of how it looks and whats different from dependabot was what made me look at it closer. also its a project with 9.1k stars and a very modern repository and automated gitops workflow (codecov 100%, docker, ci/cd, auto release with conventional commits, linting, etc)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @vercel/ncc to v0.38.1
  • chore(deps): update dependency typescript to v4.9.5
  • chore(deps): update pascalgn/size-label-action action to v0.5.0
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update actions/setup-python action to v5
  • chore(deps): update crazy-max/ghaction-github-labeler action to v5
  • chore(deps): update dependency @types/node to v20
  • chore(deps): update dependency typescript to v5
  • chore(deps): update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • chore(deps): update mcr.microsoft.com/vscode/devcontainers/typescript-node docker tag to v1
  • chore(deps): update stefanzweifel/git-auto-commit-action action to v5
  • fix(deps): update dependency @actions/github to v6
  • 🔐 Create all rate-limited PRs at once 🔐

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update actions/cache action to v4
  • chore(deps): update github/codeql-action action to v3

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
{{ cookiecutter.project_slug }}/.devcontainer/Dockerfile
  • mcr.microsoft.com/vscode/devcontainers/typescript-node 0-16-bullseye
github-actions
.github/workflows/ci.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • actions/setup-python v4@57ded4d7d5e986d7296eab16560982c6dd7c923b
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
.github/workflows/issue-label-manager.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • crazy-max/ghaction-github-labeler v4@3de87da19416edc45c90cd89e7a4ea922a3aae5a
.github/workflows/label-pr-sizes.yml
  • pascalgn/size-label-action v0.4.3@1619680c5ac1ef360b944bb56a57587ba4aa2af8
{{ cookiecutter.project_slug }}/.github/workflows/ci-self.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
{{ cookiecutter.project_slug }}/.github/workflows/ci.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • actions/setup-python v4@57ded4d7d5e986d7296eab16560982c6dd7c923b
  • actions/setup-node v3@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
  • actions/cache v3@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
  • codecov/codecov-action v3@894ff025c7b54547a9a2a1e9f228beae737ad3c2
  • stefanzweifel/git-auto-commit-action v4@3ea6ae190baf489ba007f7c92608f33ce20ef04a
{{ cookiecutter.project_slug }}/.github/workflows/codeql-analysis.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • github/codeql-action v2@f3feb00acb00f31a6f60280e6ace9ca31d91c76a
  • github/codeql-action v2@f3feb00acb00f31a6f60280e6ace9ca31d91c76a
  • github/codeql-action v2@f3feb00acb00f31a6f60280e6ace9ca31d91c76a
{{ cookiecutter.project_slug }}/.github/workflows/gh-pages.yml
  • actions/checkout v3
  • ruby/setup-ruby v1
  • actions/setup-python v4
  • actions/cache v3
  • pandoc/core 3.1
  • pandoc/core 3.1
  • stefanzweifel/git-auto-commit-action v4
  • peaceiris/actions-gh-pages v3
{{ cookiecutter.project_slug }}/.github/workflows/issue-label-manager.yml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • crazy-max/ghaction-github-labeler v4@3de87da19416edc45c90cd89e7a4ea922a3aae5a
{{ cookiecutter.project_slug }}/.github/workflows/label-pr-sizes.yml
  • pascalgn/size-label-action v0.4.3@1619680c5ac1ef360b944bb56a57587ba4aa2af8
{{ cookiecutter.project_slug }}/.github/workflows/update-major-version-tag.yml
  • nowactions/update-majorver v1@f2014bbbba95b635e990ce512c5653bd0f4753fb
npm
{{ cookiecutter.project_slug }}/package.json
  • @actions/core ^1.9.0
  • @actions/github ^5.0.3
  • js-yaml ^4.1.0
  • @types/node 17.0.45
  • @types/jest 28.1.8
  • @vercel/ncc 0.34.0
  • jest 28.1.3
  • ts-jest 28.0.8
  • typescript 4.7.4
pip_requirements
requirements-dev.txt
{{ cookiecutter.project_slug }}/requirements-dev.txt

  • Check this box to trigger a request for Renovate to run again on this repository

fix(docs): README.adoc does not generate on first repository commit push

at first i thought it's just because "no action runs on first repo commit"
but then i saw in https://github.com/JonasPammer/issue-label-manager-action/commit/f4212bcc78beb2e83661f01b60ecbb4817aef9c0
that CodeQL-Build did.

the thing that differentiates said action from the action in question (or, all of my other ones) is that is has no "push.path" option.
do i really just going to have to remove it?

search if there is an issue for this what to add to push / push.path option to make it trigger on first repo commit.
otherwhise remove push.path. its no dealbreaker, only takes 12s ci runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.