-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Showing
415 changed files
with
49,520 additions
and
13,724 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,6 @@ | ||
# ignore everything | ||
* | ||
|
||
# allow only what we need | ||
!commafeed-server/target/commafeed.jar | ||
!commafeed-server/config.yml.example |
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 |
---|---|---|
@@ -1,20 +1,48 @@ | ||
name: Java CI | ||
|
||
on: [push] | ||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: ["8", "11", "17"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: "temurin" | ||
- name: Build with Maven | ||
run: mvn --batch-mode --update-snapshots verify | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ "8", "11", "17" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: "temurin" | ||
cache: "maven" | ||
|
||
- name: Build with Maven | ||
run: mvn --batch-mode --update-snapshots verify | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ matrix.java == '8' }} | ||
with: | ||
name: commafeed.jar | ||
path: commafeed-server/target/commafeed.jar | ||
|
||
# Docker | ||
- name: Login to Container Registry | ||
if: ${{ github.ref_type == 'tag' && matrix.java == '8' }} | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Docker build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: ${{ github.ref_type == 'tag' && matrix.java == '8' }} | ||
tags: | | ||
athou/commafeed:latest | ||
athou/commafeed:${{ github.ref_name }} |
Binary file not shown.
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 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you 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 | ||
# | ||
# https://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. | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar |
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
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,12 @@ | ||
FROM openjdk:17-alpine | ||
|
||
RUN mkdir -p /commafeed/data | ||
VOLUME /commafeed/data | ||
|
||
ENV CF_SESSION_PATH=/commafeed/data/sessions | ||
|
||
COPY commafeed-server/target/commafeed.jar . | ||
COPY commafeed-server/config.yml.example config.yml | ||
|
||
EXPOSE 8082 | ||
CMD ["java", "-Djava.net.preferIPv4Stack=true", "-jar", "commafeed.jar", "server", "config.yml"] |
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
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,6 @@ | ||
dist | ||
node_modules | ||
|
||
vite.config.ts | ||
|
||
src/locales/**/*.ts |
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,85 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"react-app", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"prettier" | ||
], | ||
"plugins": ["@typescript-eslint", "prettier", "hooks"], | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
// make eslint check prettier rules | ||
"prettier/prettier": "error", | ||
|
||
// enforce consistent curly braces usage | ||
"curly": ["error", "multi-line", "consistent"], | ||
|
||
// set "props" to false because it cases false positives with immer | ||
"no-param-reassign": ["error", { "props": false }], | ||
|
||
"prefer-destructuring": [ | ||
"error", | ||
{ | ||
"array": false, | ||
"object": true | ||
}, | ||
{ | ||
"enforceForRenamedProperties": false | ||
} | ||
], | ||
|
||
// causes issues in thunks when we want to dispatch an action that is defined in the reducer | ||
"@typescript-eslint/no-use-before-define": "off", | ||
|
||
// make sure the key prop is filled when required | ||
"react/jsx-key": ["error", { "checkFragmentShorthand": true }], | ||
|
||
// configure additional hooks | ||
"react-hooks/exhaustive-deps": [ | ||
"warn", | ||
{ | ||
"additionalHooks": "(^useAsync$|useDidUpdate)" | ||
} | ||
], | ||
|
||
// trigger even if props is used only in createStyles() | ||
"react/no-unused-prop-types": "off", | ||
|
||
// no longer required with modern react versions | ||
"react/react-in-jsx-scope": "off", | ||
|
||
// not required with typescript | ||
"react/prop-types": "off", | ||
"react/require-default-props": "off", | ||
|
||
// matter of taste | ||
"react/destructuring-assignment": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/no-unescaped-entities": "off", | ||
"import/prefer-default-export": "off", | ||
|
||
// enforce hook call order | ||
"hooks/sort": [ | ||
2, | ||
{ | ||
"groups": [ | ||
"useLocation", | ||
"useParams", | ||
"useState", | ||
"useAppSelector", | ||
"useAppDispatch", | ||
"useAsync", | ||
"useForm", | ||
"useAsyncCallback", | ||
"useCallback", | ||
"useEffect" | ||
] | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.