-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4d161d6
Showing
34 changed files
with
5,611 additions
and
0 deletions.
There are no files selected for viewing
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,18 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# https://github.com/jokeyrhyme/standard-editorconfig | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# defaults | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,4 @@ | ||
build | ||
*.config.js | ||
__mocks__ | ||
coverage |
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,90 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"es2021": true, | ||
"node": true, | ||
"browser": false | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
/** @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#recommended-configs */ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"plugin:etc/recommended", | ||
"plugin:sonarjs/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module", | ||
"project": [ | ||
"./tsconfig.json" | ||
] | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"typescript": true, | ||
"node": true, | ||
"eslint-import-resolver-custom-alias": { | ||
"alias": { | ||
"/@": "./src", | ||
"/@gen": "./src-generated" | ||
}, | ||
"extensions": [".ts"], | ||
"packages": ["packages/*", "extensions/*"] | ||
} | ||
} | ||
}, | ||
"plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined"], | ||
"ignorePatterns": [ | ||
"node_modules/**", | ||
"**/dist/**" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"prefer-promise-reject-errors": "error", | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/no-misused-promises": "error", | ||
"@typescript-eslint/prefer-optional-chain": "error", | ||
|
||
/** | ||
* Having a semicolon helps the optimizer interpret your code correctly. | ||
* This avoids rare errors in optimized code. | ||
* @see https://twitter.com/alex_kozack/status/1364210394328408066 | ||
*/ | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
/** | ||
* This will make the history of changes in the hit a little cleaner | ||
*/ | ||
"comma-dangle": [ | ||
"warn", | ||
"always-multiline" | ||
], | ||
/** | ||
* Just for beauty | ||
*/ | ||
"quotes": [ | ||
"warn", "single" | ||
], | ||
"import/no-duplicates" : "error", | ||
"import/no-unresolved": "off", | ||
"import/default": "off", | ||
"import/no-named-as-default-member": "off", | ||
"import/no-named-as-default": "off", | ||
"sonarjs/cognitive-complexity": "off", | ||
"sonarjs/no-duplicate-string": "off", | ||
"sonarjs/no-empty-collection": "off", | ||
"sonarjs/no-small-switch": "off", | ||
"etc/no-commented-out-code": "error", | ||
"etc/no-deprecated": "off", | ||
"redundant-undefined/redundant-undefined": "error" | ||
} | ||
} |
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,67 @@ | ||
# | ||
# Copyright (C) 2023 Red Hat, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
# disable cache for now to not store any resource on private repo | ||
# - name: Get yarn cache directory path | ||
# id: yarn-cache-dir-path | ||
# run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT} | ||
# | ||
# - uses: actions/cache@v3 | ||
# id: yarn-cache | ||
# with: | ||
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-yarn- | ||
|
||
- name: Execute yarn | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
run: npx yarn --frozen-lockfile --network-timeout 180000 | ||
|
||
- name: Run Build | ||
run: npx yarn build | ||
|
||
- name: Login to quay.io | ||
run: podman login --username ${{ secrets.QUAY_USERNAME }} --password ${{ secrets.QUAY_PASSWORD }} quay.io | ||
|
||
- name: Publish Image | ||
id: publish-image | ||
run: | | ||
IMAGE_NAME=quay.io/bootsy/bootc-extension | ||
IMAGE_LATEST=${IMAGE_NAME}:latest | ||
IMAGE_SHA=${IMAGE_NAME}:${GITHUB_SHA} | ||
podman build -t $IMAGE_LATEST . | ||
podman push $IMAGE_LATEST | ||
podman tag $IMAGE_LATEST $IMAGE_SHA | ||
podman push $IMAGE_SHA |
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,5 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
.eslintcache | ||
**/coverage |
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,8 @@ | ||
{ | ||
"bracketSameLine": true, | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"printWidth": 120, | ||
"trailingComma": "all" | ||
} | ||
|
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 @@ | ||
ignore-engines true |
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,34 @@ | ||
# | ||
# Copyright (C) 2024 Red Hat, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM scratch as builder | ||
COPY packages/backend/dist/ /extension/dist | ||
COPY packages/backend/package.json /extension/ | ||
COPY packages/backend/media/ /extension/media | ||
COPY LICENSE /extension/ | ||
COPY packages/backend/icon.png /extension/ | ||
COPY README.md /extension/ | ||
|
||
|
||
FROM scratch | ||
|
||
LABEL org.opencontainers.image.title="Studio extension" \ | ||
org.opencontainers.image.description="Studio extension" \ | ||
org.opencontainers.image.vendor="Red Hat" \ | ||
io.podman-desktop.api.version=">= 1.6.0" | ||
|
||
COPY --from=builder /extension /extension |
Oops, something went wrong.