dashboard/.github/workflows/main.yml

107 lines
2.2 KiB
YAML
Raw Normal View History

2022-01-30 12:44:32 +01:00
name: Tests and push apps
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
style:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Setup node.js
2024-02-11 06:13:38 +01:00
uses: actions/setup-node@v4
2022-01-30 12:44:32 +01:00
with:
node-version: '16'
- name: Install dependencies
uses: borales/actions-yarn@v5.0.0
2022-01-30 12:44:32 +01:00
with:
cmd: install
- name: Check code formatting
uses: borales/actions-yarn@v5.0.0
2022-01-30 12:44:32 +01:00
with:
cmd: prettier --check
- name: Check code linting
uses: borales/actions-yarn@v5.0.0
2022-01-30 12:44:32 +01:00
with:
cmd: lint
dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Setup node.js
2024-02-11 06:13:38 +01:00
uses: actions/setup-node@v4
2022-01-30 12:44:32 +01:00
with:
node-version: '16'
- name: Install dependencies
uses: borales/actions-yarn@v5.0.0
2022-01-30 12:44:32 +01:00
with:
cmd: install
- name: Check code typing
uses: borales/actions-yarn@v5.0.0
2022-01-30 12:44:32 +01:00
with:
cmd: typecheck
- name: Run unit tests
uses: borales/actions-yarn@v5.0.0
2022-01-30 12:44:32 +01:00
with:
cmd: test --coverage
- name: Codecov
uses: codecov/codecov-action@v4
2022-01-30 12:44:32 +01:00
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
build:
runs-on: ubuntu-latest
needs: [style, dashboard]
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
2022-01-30 12:44:32 +01:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2022-03-05 19:13:21 +01:00
2022-01-30 12:44:32 +01:00
- name: Login to DockerHub
uses: docker/login-action@v3
2022-01-30 12:44:32 +01:00
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-03-05 19:13:21 +01:00
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
2022-03-05 19:13:21 +01:00
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2022-01-30 12:44:32 +01:00
- name: Build and push
uses: docker/build-push-action@v5
2022-01-30 12:44:32 +01:00
with:
push: true
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
2022-03-05 19:13:21 +01:00
tags: |
phntxx/dashboard:latest
ghcr.io/phntxx/dashboard:latest