-
-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (39 loc) · 1.25 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
name: MinaJS Continuous Integration
on:
push:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun i --no-save
- run: bun run test
release:
name: Release
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install Nixpacks
run: |
curl -LO https://github.com/railwayapp/nixpacks/releases/download/v1.27.1/nixpacks-v1.27.1-amd64.deb
sudo dpkg -i nixpacks-v1.27.1-amd64.deb
- uses: oven-sh/setup-bun@v2
- run: bun i --no-save
- run: bun run build
- run: bunx pkg-pr-new publish './packages/klesia-sdk'
- run: nixpacks build . --config apps/klesia/nixpacks.toml
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag image
run: docker tag $(docker images --format='{{.ID}}' | head -1) ghcr.io/palladians/klesia:$(git rev-parse --short HEAD)
- name: Push to GHCR
run: docker push ghcr.io/palladians/klesia:$(git rev-parse --short HEAD)