1.1.8 • Published 5 days ago

@cloud-cli/gd v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

GD

Receive updates from GitHub webhooks

Events

With Cloudy, listen to events:

import { events } from '@cloud-cli/cli';

events.on('gd:command', command => { /* ... */ });

Commands

DeployCommand:

Contains a docker image published in GHCR and a version

Usage

First create a unique random string to use as secret. For example:

head -c 5000 /dev/urandom | sha512sum

Now paste this key into a file in your system. Let's use /home/key.txt.

Next, we create our http server to receive the webhooks:

import { createServer } '@cloud-cli/gd';
import { readFileSync } from 'fs';

const secret = readFileSync('/home/key.txt', 'utf-8');
const port = 1234;
const host = '127.0.0.1';

const server = createServer({ secret, host, port });
server.on('command', command => {
  console.log(command);
});

In GitHub, go to Webhook settings and point to your server using these settings:

Payload URL:
[ https://your-server.example.com/ ]

Content-Type:
[ application/json ]

Secret
[ secret string ]

Which events would you like to trigger this webhook?

[ * ] Let me select individual events.

...
[ x ] Branch or tag deletion
[ x ] Packages -- GitHub Packages published or updated in a repository.
1.1.8

5 days ago

1.1.7

6 days ago

1.1.6

10 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago