Skip to content

Server stats

Server stats #15

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
# Only on main
- name: Get package version
id: get_version
run: |
echo ::set-output name=VERSION3::$(node -p "require('./package.json').version")
echo ::set-output name=VERSION2::$(node -p "require('./package.json').version.split('.').slice(0, 2).join('.')")
- uses: docker/login-action@v3
if: github.ref == 'refs/heads/main'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
if: github.ref == 'refs/heads/main'
- uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
with:
context: .
push: true
tags: |
thgh/hivepanel:${{ steps.get_version.outputs.VERSION3 }}
thgh/hivepanel:${{ steps.get_version.outputs.VERSION2 }}
thgh/hivepanel:latest
platforms: linux/amd64,linux/arm64/v8