Added user email verification #734
Workflow file for this run
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
name: On pull request | |
on: pull_request | |
jobs: | |
web_lint_test: | |
name: Web - Lint - Format - Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- uses: actions/setup-node@master | |
with: | |
node-version: 18.x | |
# write local env file .env with secrets | |
# add dummy keys to get the required markers for next-auth and postgres | |
- name: Write local env file | |
run: | | |
echo "DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres?schema=public" >> .env | |
echo "NEXTAUTH_SECRET=dummy_key" >> .env | |
echo "NEXTAUTH_URL=http://localhost:3000" >> .env | |
echo "NEXT_PUBLIC_SITE_NAME=ZTnet" >> .env | |
echo "NEXT_PUBLIC_APP_VERSION=" >> .env | |
echo "IS_GITHUB_ACTION=true" >> .env | |
- run: npm install | |
- name: Lint | |
run: npm run lint | |
- name: Formatter | |
run: npm run format | |
- name: Test | |
run: npm run test | |
test_build: | |
name: Test Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- id: lowercaseRepo | |
uses: ASzc/change-string-case-action@v5 | |
with: | |
string: ${{ github.repository }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Create short sha | |
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: false | |
build-args: | | |
"NEXT_PUBLIC_APP_VERSION=test" | |
tags: | | |
sinamics/ztnet:latest-dev |