Skip to content

Commit

Permalink
feat: initialize project
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Feb 6, 2025
0 parents commit f3c6670
Show file tree
Hide file tree
Showing 16 changed files with 67,575 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "nickliffen/ghas-enablement",
"image": "ghcr.io/nickliffen/csenv:main",
"runArgs": [
"--init",
"--privileged"
],
"mounts": [
"source=dind-var-lib-docker,target=/var/lib/docker,type=volume"
],
"overrideCommand": false,
"settings": {},
"extensions": [
"dbaeumer.vscode-eslint",
"hookyqr.beautify",
"naumovs.color-highlight",
"redhat.vscode-yaml",
"vscode-icons-team.vscode-icons",
"wayou.vscode-todo-highlight",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next",
"github.copilot",
"donjayamanne.githistory",
"nixon.env-cmd-file-syntax"
],
"postCreateCommand": "yarn install --frozen-lockfile && yarn run build",
"remoteUser": "root"
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
coverage
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
dependencies:
patterns:
- "*"
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
groups:
dependencies:
patterns:
- "*"
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "CI"

on:
push:
branches:
- '**'

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install
run: yarn

- name: Lint
run: yarn run lint:check

- name: Prettier
run: yarn run prettier:check

test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install
run: yarn

- name: Test Action
uses: ./
with:
countryCodes: |
US
HK
SG
DE
target: venus.io
124 changes: 124 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
prs.txt

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Act
my.secrets

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Remove .DS_Store files with globbing
.DS_Store

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
lib
lib/*

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Build action
yarn run build

# Add build files to commit
git add . dist
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.1
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Venus Globalping Github Action

## Introduction

A GitHub Action to ping a website from multiple locations using [Globalping](https://globalping.io).

## Usage

```yaml
- name: Ping
uses: VenusProtocol/globalping-action
with:
countryCodes: |
US
HK
SG
DE
target: venus.io
```
14 changes: 14 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Venus Globalping GitHub Action'
author: 'Venus Protocol'
description: 'A GitHub Action to ping a website from multiple locations using Globalping'
inputs:
target:
description: 'Target (hostname, IPv4 or IPv6 address)'
required: true
countryCodes:
multiline: true
description: 'List of countries (based on ISO 3166-1 alpha-2 country codes) to ping the website from'
required: true
runs:
using: 'node20'
main: 'dist/index.js'
Loading

0 comments on commit f3c6670

Please sign in to comment.