Skip to content

Commit

Permalink
Merge branch 'main' into snyk-upgrade-e68a9f1d1cd15abf3df300985fe3eda4
Browse files Browse the repository at this point in the history
  • Loading branch information
kahboom authored May 22, 2024
2 parents a1e0f9a + 2dc6e52 commit 7c80166
Show file tree
Hide file tree
Showing 70 changed files with 32,138 additions and 9,659 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"plugin:react-hooks/recommended",
"prettier"
],
"ignorePatterns": ["**/*.stories.tsx"],
"ignorePatterns": [
"**/*.mdx",
"**/*.stories.(ts,tsx)",
"src/stories/**",
"src/modules/*.stories.(js,ts,jsx,tsx)",
"src/modules/components/*.stories.(js,ts,jsx,tsx)"
],
"plugins": ["react-hooks"],
"overrides": [
// Only use Testing Library lint rules in test files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
branch: [main]
with:
branch: ${{ matrix.branch }}
images: '["registry.access.redhat.com/ubi9/nodejs-18"]'
images: '["registry.access.redhat.com/ubi9/nodejs-20"]'
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check prettify code
uses: creyD/[email protected]
with:
Expand Down
35 changes: 18 additions & 17 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
Expand All @@ -48,21 +49,18 @@ jobs:
echo "Unable to determine packager manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "lts/*"
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Setup Pages
uses: actions/configure-pages@v3
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
uses: actions/configure-pages@v4

- name: Restore cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.next/cache
Expand All @@ -71,14 +69,17 @@ jobs:
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}

- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Static HTML export with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next export
env:
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN: ${{ secrets.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./out

Expand All @@ -90,6 +91,6 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: reviewdog/action-eslint@v1
with:
reporter: github-check
eslint_flags: "src/"
eslint_flags: "src/ --ignore-pattern '**/*.stories.{js,jsx,ts,tsx}' --ignore-pattern '**/*.mdx'"

action-lint:
name: Action lint
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# production
/build
/.next
out

# misc
.DS_Store
Expand All @@ -20,6 +21,7 @@
.env.production.local

npm-debug.log*
*storybook.log*
yarn-debug.log*
yarn-error.log*

Expand All @@ -28,3 +30,8 @@ yarn-error.log*
**/.vscode/

**/.DS_Store

# cypress
/cypress/downloads
/cypress/videos
/cypress/screenshots
10 changes: 9 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
build*
node_modules*
.next*
**/generated/**
LICENSE
.gitignore
.tekton
.github
.husky
.swc
assets
coverage
cypress/downloads
cypress/screenshots
out
public
33 changes: 33 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { StorybookConfig } from "@storybook/nextjs";
import path from "path";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/nextjs",
options: {},
},
docs: {
autodocs: "tag",
},
webpackFinal: async config => {
if (config.resolve) {
config.resolve.alias = {
...config.resolve.alias,
"@": path.resolve(__dirname, "../src"),
react: path.resolve("./node_modules/react"),
"react-dom": path.resolve("./node_modules/react-dom"),
"./src/modules/x509/decode": require.resolve(
"../src/modules/x509/decode",
),
};
}
return config;
},
};
export default config;
21 changes: 21 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import "@patternfly/patternfly/patternfly.css";
import "@patternfly/patternfly/utilities/Accessibility/accessibility.css";
import "@patternfly/patternfly/utilities/Display/display.css";
import "@patternfly/patternfly/utilities/Flex/flex.css";
import "@patternfly/patternfly/utilities/Sizing/sizing.css";
import "@patternfly/patternfly/utilities/Spacing/spacing.css";
import type { Preview } from "@storybook/react";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
Loading

0 comments on commit 7c80166

Please sign in to comment.