Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action #2

Open
gr2m opened this issue Aug 14, 2020 · 1 comment
Open

GitHub Action #2

gr2m opened this issue Aug 14, 2020 · 1 comment

Comments

@gr2m
Copy link
Collaborator

gr2m commented Aug 14, 2020

👋 @bnb

thanks for the call 👍🏼

Here is my understanding of what this repository does

  1. Loads https://nodejs.org/dist/index.json on a schedule
  2. Checks if there is a change
  3. If there is a change, send a tweet

Here is what I'd suggest we do

  1. Rewrite the current implementation using GitHub Actions
  2. Register a @nodekitten GitHub App and implement it using another GitHub Action in this repository
  3. Create at least one example GitHub Action that acts on the repository dispatch event.

Rewrite the current implementation using GitHub Actions

We can create the GitHub Action and make it work in parallel with the current implementation, then once we are happy with it, we can delete all the Azure Functions code.

To start, we should maybe create a twitter account for testing, or use an existing one if you have that. We will have to configure the credentials in this repository's secrets

The Action would load the new JSON file, then write it to this repository, so we don't need an external way of caching it. After loading the JSON, we compare it to the existing one, and if they are the same length then we are done.

@bnb can you take care of setting the secrets? https://github.com/cutenode/nodekitten-serverless/settings/secrets

Register a @nodekitten GitHub App and implement it using another GitHub Action in this repository

I would start out with creating a README explaining how users can install the @nodekitten app and how they can utilize to trigger their own actions

The actual implementation of creating the repository dispatch events will work very similar to what I did for the octokit-routes app. Here is the code, it is loaded by this workflow

@bnb Can you take care of registering the @nodekitten app. You can register the app for the @cutenode organization in https://github.com/organizations/cutenode/settings/apps/new. We need the Contents permission (read & write). Disable the webhooks. We can update the description later

Create at least one example GitHub Action that acts on the repository dispatch event

This would be the actual submission to the hackathon. For example, we could write an action that updates the test matrix in GitHub Action workflow files, such as this one: https://github.com/octokit/core.js/blob/ed8ce5c7fa86bb2b60821ba9809c80a7fc0fb712/.github/workflows/test.yml#L15-L18. We could make a set of actions in order to update the config files for the most popular CI services


Question: do we also get a trigger when an existing Node release

  • becomes LTS?
  • becomes maintenance?
  • gets out of maintenance?
@bnb
Copy link
Member

bnb commented Aug 17, 2020

@gr2m sounds good to me.

On your question, we could start with something simple like all or all LTS releases, or we could provide a couple options like patch, minor, major and security options that can be applied to latest, lts where latests will always be the current release line and lts will always be the most recent LTS line (as opposed to the maintenance line).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants