-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: convert to cloudflare workers template
- Loading branch information
Showing
24 changed files
with
10,008 additions
and
15,949 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
], | ||
}] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
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 }} | ||
|
||
- name: "🚀 deploy" | ||
uses: web3-storage/wrangler-action@78130c1d1e3ceb6ee3bb7613d7753431ce6bb479 | ||
with: | ||
apiToken: ${{ secrets.CF_API_TOKEN }} | ||
|
||
cleanup: | ||
name: Cleanup actions | ||
needs: | ||
- release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "♻️ remove build artifacts" | ||
uses: geekyeggo/delete-artifact@v1 | ||
with: | ||
name: | | ||
diagram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.