-
Notifications
You must be signed in to change notification settings - Fork 24
74 lines (67 loc) · 2.13 KB
/
ikaros_ci_build_dev_container.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This is a basic workflow to help you get started with Actions
name: Build Dev Container
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "master" branch
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Git submodule init
uses: snickerbockers/submodules-init@v4
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
cache: 'gradle'
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Clean with gradle
run: |
./gradlew clean
- name: Install pnpm
run: npm install -g pnpm
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Reduce pnpm concurrency
run: pnpm config set fetch-retries 5 && pnpm config set fetch-timeout 60000 && pnpm config set max-concurrent-requests 6
- name: Use npm mirror
run: |
npm config set registry https://registry.npmmirror.com
pnpm config set registry https://registry.npmmirror.com
- name: Build console with npm
run: |
./gradlew buildFrontend -x test
- name: Build server with gradle
run: |
./gradlew build -x test
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build image and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: |
ikarosrun/ikaros:dev