-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (51 loc) · 1.54 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build
on:
push:
branches:
- master
jobs:
build-beatmap-viewer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install
- run: pnpm exec nx run beatmap-viewer:build
- name: Docker Client Meta
id: meta-client
uses: docker/metadata-action@v5
with:
images: ghcr.io/minetoblend/osucad-beatmap-viewer
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,prefix=
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: ./packages/beatmap-viewer
file: ./packages/beatmap-viewer/Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-client.outputs.tags }}
labels: ${{ steps.meta-client.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
push: true