Mention URL for forwarding heartbeats to wakapi #39
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: hakatime | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-dashboard: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('dashboard/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Build | |
run: | | |
cd dashboard | |
yarn install | |
yarn run ci | |
build-server: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: '9.2.7' | |
cabal-version: '3.10.1.0' | |
- uses: haskell/actions/hlint-setup@v2 | |
with: | |
version: '3.5' | |
- name: Freeze Cabal plan | |
run: cabal freeze | |
- name: Cache Cabal build artifacts | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ steps.setup-haskell-build-env.outputs.cabal-store }} | |
dist-newstyle | |
key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: | | |
${{ runner.os }}-cabal | |
- name: Build | |
run: cabal build | |
- uses: haskell/actions/hlint-run@v2 | |
with: | |
path: src/ | |
fail-on: warning | |
build-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker build | |
uses: docker/build-push-action@v3 | |
with: | |
file: ./Dockerfile | |
push: false | |
context: ./ |