Skip to content

Commit

Permalink
Merge pull request #2 from 0-vortex/convert-to-workers
Browse files Browse the repository at this point in the history
feat: convert to cloudflare workers template
  • Loading branch information
bdougie committed Mar 1, 2022
2 parents b765ea5 + 2720c1b commit 07af51b
Show file tree
Hide file tree
Showing 25 changed files with 10,833 additions and 15,950 deletions.
12 changes: 0 additions & 12 deletions .dockerignore

This file was deleted.

14 changes: 14 additions & 0 deletions .editorconfig
@@ -0,0 +1,14 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
max_line_length = 120
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
9 changes: 0 additions & 9 deletions .env.example

This file was deleted.

49 changes: 49 additions & 0 deletions .eslintrc.cjs
@@ -0,0 +1,49 @@
module.exports = {
plugins: [
"jest"
],
extends: [
"airbnb-base/legacy",
"airbnb-base/whitespace",
],
env: {
browser: true,
serviceworker: true,
es2021: true,
"jest/globals": true
},
globals: {
// secrets
APP_ID: "readonly",
APP_PK: "readonly",
CLIENT_ID: "readonly",
CLIENT_SECRET: "readonly",
WEBHOOK_SECRET: "readonly",
DISCORD_URL: "readonly",
},
parserOptions: {
ecmaVersion: 13,
ecmaFeatures: {
impliedStrict: true
},
sourceType: "module",
allowImportExportEverywhere: false
},
ignorePatterns: [
'dist/',
'node_modules/',
'worker/',
],
rules: {
"no-console": 0,
"import/no-unresolved": 0,
"import/extensions": 0,
"no-restricted-syntax": 0,
"no-restricted-globals": 0,
camelcase: [2, {
allow: [
"avatar_url"
],
}]
}
};
13 changes: 13 additions & 0 deletions .github/workflows/codeql-analysis.yml
@@ -0,0 +1,13 @@
name: "CodeQL"

on:
push:
branches:
- main
pull_request:
schedule:
- cron: '56 5 * * 1'

jobs:
analyze:
uses: open-sauced/open-sauced/.github/workflows/codeql-analysis.yml@main
15 changes: 15 additions & 0 deletions .github/workflows/compliance.yml
@@ -0,0 +1,15 @@
name: "Compliance"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: write

jobs:
compliance:
uses: open-sauced/open-sauced/.github/workflows/compliance.yml@main
13 changes: 13 additions & 0 deletions .github/workflows/development.yml
@@ -0,0 +1,13 @@
name: "Development"

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

jobs:
test:
uses: open-sauced/open-sauced/.github/workflows/development.yml@main
93 changes: 93 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,93 @@
name: Release

on:
push:
branches:
- main
- alpha
- beta

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

jobs:
test:
name: Test and lint
uses: open-sauced/open-sauced/.github/workflows/development.yml@main

build:
name: Build application
runs-on: ubuntu-latest
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v2

- name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 16

- name: "🔧 install npm@latest"
run: npm i -g npm@latest

- name: "📦 install dependencies"
uses: bahmutov/npm-install@v1

- name: "📊 repository visualizer"
id: diagram
uses: githubocto/repo-visualizer@0.7.1
with:
excluded_paths: "node_modules,build,.storybook,.netlify,.github,npm-shrinkwrap.json"
output_file: "public/diagram.svg"
should_push: false
root_path: "src/"

- name: "📊 visualiser artifacts"
uses: actions/upload-artifact@v2
with:
name: diagram
path: public/diagram.svg

release:
environment:
name: production
url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.semantic-release.outputs.release-tag }}
name: Semantic release
needs:
- test
- build
runs-on: ubuntu-latest
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: "♻️ clean up artifact paths"
run: |
rm -rf public/diagram.svg
- name: "📂 download diagram artifacts"
uses: actions/download-artifact@v2
with:
name: diagram
path: public/

- name: "🚀 release"
id: semantic-release
uses: open-sauced/release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cleanup:
name: Cleanup actions
needs:
- release
runs-on: ubuntu-latest
steps:
- name: "♻️ remove build artifacts"
uses: geekyeggo/delete-artifact@v1
with:
name: |
diagram
11 changes: 11 additions & 0 deletions .github/workflows/triage.yml
@@ -0,0 +1,11 @@
name: "Assign issues"

on:
issue_comment:
types:
- created
- edited

jobs:
assign:
uses: open-sauced/open-sauced/.github/workflows/triage.yml@main

0 comments on commit 07af51b

Please sign in to comment.