chore: add gh action for lint and fix format with prettier

This commit is contained in:
Shahrad Elahi 2024-01-08 13:22:33 +03:30
parent 5a67dd3838
commit 4ffc3640d0
4 changed files with 57 additions and 4 deletions

49
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: CI
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm lint
ghcr-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PRIVATE_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false

View File

@ -6,6 +6,7 @@ node_modules
.env
.env.*
!.env.example
src/lib/assets
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml

View File

@ -21,7 +21,11 @@
} from '$lib/components/ui/form';
import { FormItem } from '$lib/components/ui/form/index.js';
import { cn } from '$lib/utils';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '$lib/components/ui/collapsible';
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '$lib/components/ui/collapsible';
import { Button } from '$lib/components/ui/button';
import toast from 'svelte-french-toast';
@ -88,7 +92,7 @@
<FormLabel>Port</FormLabel>
<FormInput placeholder={'e.g. 51820'} type={'text'} />
<FormDescription
>This is the port that the WireGuard server will listen on.</FormDescription
>This is the port that the WireGuard server will listen on.</FormDescription
>
<FormValidation />
</FormItem>
@ -118,7 +122,7 @@
<FormLabel>DNS</FormLabel>
<FormInput placeholder={'e.g. 1.1.1.1'} type={'text'} />
<FormDescription
>Optional. This is the DNS server that will be pushed to clients.</FormDescription
>Optional. This is the DNS server that will be pushed to clients.</FormDescription
>
<FormValidation />
</FormItem>

View File

@ -81,7 +81,6 @@
onDestroy(() => {
clearInterval(interval);
});
</script>
<Card>