Skip to content

Remove forwardRef

Remove forwardRef #149

Workflow file for this run

name: Server
on:
push:
paths:
- server/**
- frontend/**
- Dockerfile
- .github/workflows/server.yml
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install
run: npm ci
working-directory: frontend/
- name: Run prettier
run: npm run prettier
working-directory: frontend/
- name: Run eslint
run: npm run eslint
working-directory: frontend/
build_push:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
packages: write
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get version
id: version
run: |
echo "version=$(cat server/VERSION)" >> "$GITHUB_OUTPUT"
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,enable=true,value=${{ steps.version.outputs.version }}
type=raw,enable=true,value=latest
- name: Check pushed
id: pushed
run: |
set +e
docker pull $(echo "${{ steps.meta.outputs.tags }}" | head -n 1 | tr -d '\n')
echo "pushed=$(if [ $? -eq 0 ]; then echo "true"; else echo "false"; fi)" >> "$GITHUB_OUTPUT"
- name: Build/push image
uses: docker/build-push-action@v5
with:
push: ${{ github.ref == 'refs/heads/main' && steps.pushed.outputs.pushed == 'false' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Release
if: github.ref == 'refs/heads/main' && steps.pushed.outputs.pushed == 'false'
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create server/$VERSION \
--title "Server ($VERSION)"