-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (28 loc) · 962 Bytes
/
docker-test.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
name: Test Build-Env Docker Image
on:
pull_request:
branches: master
paths:
- '**Dockerfile'
- '**docker.yml'
jobs:
build-test-env-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t test-image -f docker/Dockerfile .
- name: Build Docker image
run: docker build -t test-image -f docker/Dockerfile ./docker
- name: Run commands in Docker container
run: |
docker run --rm -v ${{ github.workspace }}:/workspace --user root \
-e HOST_UID=$(id -u) -e HOST_GID=$(id -g) test-image /bin/bash -c "
usermod -u \$HOST_UID builder && groupmod -g \$HOST_GID builder &&
chown -R \$HOST_UID:\$HOST_GID /home/builder &&
su builder -l -c 'cd /workspace &&
bun install &&
bun run codegen &&
bun run meson-setup.clang-release &&
bun run vs.example
'"