Skip to content

Commit

Permalink
pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Nov 5, 2023
1 parent d045a93 commit a1ab0e6
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
"next/babel"
],
"plugins": [
["styled-components", { "ssr": true, "displayName": true }]
]
}
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
node_modules
.vscode
public/vendor
**/*.css
59 changes: 59 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"env": {
"node": true,
"browser": true,
"es2021": true
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "import", "react-hooks"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",

"@typescript-eslint/no-var-requires": "warn",

"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"no-console": ["error", { "allow": ["warn", "error", "info"] }],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "ethers",
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
}
]
}
]
}
}
52 changes: 52 additions & 0 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'Build and Deploy - Eden.art'

on:
workflow_dispatch:
push:
branches: [main]

pull_request:
branches: [main]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
ENV_STAGE: stage

jobs:
build-and-push-to-ghcr:
name: Build
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
outputs:
tag: ${{ steps.prep.outputs.tag }}
steps:
- uses: actions/checkout@v2

- id: prep
run: |
TAG=$(echo $GITHUB_SHA | head -c7)
IMAGE="${{ env.REGISTRY }}/edenartlab/hello"
echo ::set-output name=tagged_image::${IMAGE}:${TAG}
echo ::set-output name=tag::${TAG}
echo ::set-output name=image::${IMAGE}
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags:
${{ steps.prep.outputs.tagged_image }},${{ steps.prep.outputs.image
}}:latest
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

.env


# dependencies
/node_modules
package-lock.json

# misc
.DS_Store
.env.production
.env.local
.env.development.local
.env.test.local
.env.production.local

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

# Next.js
/.next
tsconfig.tsbuildinfo
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore artifacts:
dist
.next
build
node_modules/
public
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"printWidth": 80,
"proseWrap": "always",
"singleQuote": true,
"tabWidth": 2,
"semi": false,
"trailingComma": "all",
"overrides": [
{
"files": "*.md",
"options": {
"printWidth": 600
}
}
],
"organizeImportsSkipDestructiveCodeActions": true
}
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--ignore-platform true

0 comments on commit a1ab0e6

Please sign in to comment.