Skip to content

[Feature] Enhanced admin operations for platform users #195

[Feature] Enhanced admin operations for platform users

[Feature] Enhanced admin operations for platform users #195

Workflow file for this run

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
- 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@v2
# checkout dev branch
with:
ref: dev
- 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: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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"
# platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest-dev