Skip to content

Commit 9fe73db

Browse files
committed
fix luau and try docker again
1 parent bc4041a commit 9fe73db

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

.github/workflows/bevy_mod_scripting.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ name: Check and Lint - bevy_mod_scripting
1515

1616

1717
env:
18-
1918
REGISTRY: ghcr.io
2019
IMAGE_NAME: bevy-mod-scripting
2120

@@ -27,8 +26,46 @@ concurrency:
2726
cancel-in-progress: true
2827

2928
jobs:
29+
build-runner-image:
30+
permissions:
31+
contents: read
32+
packages: write
33+
runs-on: ubuntu-latest
34+
build-with-docker:
35+
name: Build multi-platform Docker image
36+
runs-on: ubuntu-20.04
37+
outputs:
38+
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: docker/setup-qemu-action@v3
42+
- uses: docker/setup-buildx-action@v3
43+
- name: Docker meta
44+
id: meta
45+
uses: docker/metadata-action@v5
46+
with:
47+
images: |
48+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49+
- name: Login to GitHub Container Registry
50+
uses: docker/login-action@v3
51+
with:
52+
registry: ghcr.io
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GITHUB_TOKEN }}
55+
- uses: docker/build-push-action@v5
56+
with:
57+
context: .
58+
file: ./crates/xtask/Dockerfile
59+
platforms: linux/amd64,linux/arm64,windows/amd64
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
tags: ${{ steps.meta.outputs.tags }}
63+
labels: ${{ steps.meta.outputs.labels }}
64+
3065
generate-job-matrix:
66+
needs: build-runner-image
3167
runs-on: ubuntu-latest
68+
container: ${{ needs.build-runner-image.outputs.image }}
3269
outputs:
3370
matrix: ${{ steps.generate-matrix.outputs.matrix }}
3471
steps:
@@ -48,7 +85,10 @@ jobs:
4885
pull-requests: write
4986
name: Check - ${{ matrix.run_args.name }}
5087
runs-on: ${{ matrix.run_args.os }}
51-
needs: generate-job-matrix
88+
container: ${{ needs.build-runner-image.outputs.image }}
89+
needs:
90+
- generate-job-matrix
91+
- build-runner-image
5292
strategy:
5393
matrix:
5494
run_args: ${{fromJson(needs.generate-job-matrix.outputs.matrix)}}

crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ impl IntoLua for LuaScriptValue {
8989
Ok(match self.0 {
9090
ScriptValue::Unit => Value::Nil,
9191
ScriptValue::Bool(b) => Value::Boolean(b),
92+
#[cfg(not(feature = "luau"))]
9293
ScriptValue::Integer(i) => Value::Integer(i),
94+
#[cfg(feature = "luau")]
95+
ScriptValue::Integer(i) => Value::Integer(i as i32),
9396
ScriptValue::Float(f) => Value::Number(f),
9497
ScriptValue::String(s) => Value::String(lua.create_string(s.as_ref())?),
9598
ScriptValue::Reference(r) => LuaReflectReference::from(r).into_lua(lua)?,

0 commit comments

Comments
 (0)