Skip to content

Commit f0c2986

Browse files
authored
Use dotnet image for Godot 4 (#106)
1 parent d68f7da commit f0c2986

File tree

6 files changed

+52
-17
lines changed

6 files changed

+52
-17
lines changed

.github/workflows/check-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
fetch:
1010
name: Fetch Latest Godot Engine Release
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
outputs:
1313
release_tag: ${{ steps.parse.outputs.tag }}
1414
steps:
@@ -20,7 +20,7 @@ jobs:
2020
echo "tag=$TAG" >> $GITHUB_OUTPUT
2121
current:
2222
name: Fetch Current Godot CI release
23-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-22.04
2424
outputs:
2525
release_tag: ${{ steps.parse.outputs.tag }}
2626
steps:
@@ -32,7 +32,7 @@ jobs:
3232
create:
3333
needs: [fetch, current]
3434
name: Create New Godot CI Release
35-
runs-on: ubuntu-20.04
35+
runs-on: ubuntu-22.04
3636
if: needs.fetch.outputs.release_tag != needs.current.outputs.release_tag
3737
steps:
3838
- uses: actions/checkout@v3

.github/workflows/godot-ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
jobs:
1212
export-windows:
1313
name: Windows Export
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04 # Use 22.04 with godot 4
1515
container:
1616
image: barichello/godot-ci:4.3
1717
steps:
@@ -39,7 +39,7 @@ jobs:
3939

4040
export-linux:
4141
name: Linux Export
42-
runs-on: ubuntu-20.04
42+
runs-on: ubuntu-22.04 # Use 22.04 with godot 4
4343
container:
4444
image: barichello/godot-ci:4.3
4545
steps:
@@ -65,7 +65,7 @@ jobs:
6565

6666
export-web:
6767
name: Web Export
68-
runs-on: ubuntu-20.04
68+
runs-on: ubuntu-22.04 # Use 22.04 with godot 4
6969
container:
7070
image: barichello/godot-ci:4.3
7171
steps:
@@ -99,7 +99,7 @@ jobs:
9999

100100
export-mac:
101101
name: Mac Export
102-
runs-on: ubuntu-20.04
102+
runs-on: ubuntu-22.04 # Use 22.04 with godot 4
103103
container:
104104
image: barichello/godot-ci:4.3
105105
steps:

.github/workflows/manual_build.yml

+24-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,29 @@ on:
1414
env:
1515
IMAGE_NAME: godot-ci
1616
jobs:
17+
version:
18+
name: Get Version
19+
runs-on: ubuntu-22.04
20+
outputs:
21+
dotnet_version: ${{ steps.calculate.outputs.dotnet_version }}
22+
steps:
23+
- id: calculate
24+
run: |
25+
MAJOR_VERSION=$(echo ${{ github.event.inputs.version }} | cut -c -1)
26+
MINOR_VERSION=$(echo ${{ github.event.inputs.version }} | cut -c -3)
27+
if [ "$MAJOR_VERSION" = "3" ]
28+
then
29+
echo "dotnet_version=mono:latest" >> $GITHUB_OUTPUT
30+
elif [ "$MINOR_VERSION" = "4.0" ] || [ "$MINOR_VERSION" = "4.1" ] || [ "$MINOR_VERSION" = "4.2" ] || [ "$MINOR_VERSION" = "4.3" ]
31+
then
32+
echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:6.0-jammy" >> $GITHUB_OUTPUT
33+
else
34+
echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:8.0-jammy" >> $GITHUB_OUTPUT
35+
fi
36+
1737
build:
1838
name: Build Image
19-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-22.04
2040
steps:
2141
- uses: actions/checkout@v3
2242
- run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
@@ -49,7 +69,8 @@ jobs:
4969
GODOT_PLATFORM=${{ startsWith( github.event.inputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }}
5070
build-mono:
5171
name: Build Mono Image
52-
runs-on: ubuntu-20.04
72+
runs-on: ubuntu-22.04
73+
needs: [version]
5374
steps:
5475
- uses: actions/checkout@v3
5576
- run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
@@ -75,6 +96,7 @@ jobs:
7596
ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:mono-${{ github.event.inputs.version }}${{ env.IMAGE_TAG }}
7697
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-${{ github.event.inputs.version }}${{ env.IMAGE_TAG }}
7798
build-args: |
99+
IMAGE=${{ needs.version.outputs.dotnet_version }}
78100
GODOT_VERSION=${{ github.event.inputs.version }}
79101
RELEASE_NAME=${{ github.event.inputs.release_name }}
80102
SUBDIR=${{ github.event.inputs.release_name != 'stable' && format('/{0}', github.event.inputs.release_name) || '' }}

.github/workflows/release.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,32 @@ env:
77
jobs:
88
version:
99
name: Get Version
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
outputs:
1212
version: ${{ steps.calculate.outputs.version }}
1313
release_name: ${{ steps.calculate.outputs.release_name }}
14+
dotnet_version: ${{ steps.calculate.outputs.dotnet_version }}
1415
steps:
1516
- id: calculate
1617
run: |
1718
REF_NAME=${{ github.ref_name }}
1819
echo "version=${REF_NAME%-*}" >> $GITHUB_OUTPUT
1920
echo "release_name=${REF_NAME#*-}" >> $GITHUB_OUTPUT
21+
MAJOR_VERSION=$(echo ${REF_NAME%-*} | cut -c -1)
22+
MINOR_VERSION=$(echo ${REF_NAME%-*} | cut -c -3)
23+
if [ "$MAJOR_VERSION" = "3" ]
24+
then
25+
echo "dotnet_version=mono:latest" >> $GITHUB_OUTPUT
26+
elif [ "$MINOR_VERSION" = "4.0" ] || [ "$MINOR_VERSION" = "4.1" ] || [ "$MINOR_VERSION" = "4.2" ] || [ "$MINOR_VERSION" = "4.3" ]
27+
then
28+
echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:6.0-jammy" >> $GITHUB_OUTPUT
29+
else
30+
echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:8.0-jammy" >> $GITHUB_OUTPUT
31+
fi
32+
2033
build:
2134
name: Build Image
22-
runs-on: ubuntu-20.04
35+
runs-on: ubuntu-22.04
2336
needs: [version]
2437
steps:
2538
- uses: actions/checkout@v3
@@ -53,7 +66,7 @@ jobs:
5366
GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }}
5467
build-mono:
5568
name: Build Mono Image
56-
runs-on: ubuntu-20.04
69+
runs-on: ubuntu-22.04
5770
needs: [version]
5871
steps:
5972
- uses: actions/checkout@v3
@@ -81,6 +94,7 @@ jobs:
8194
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-latest
8295
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-${{ needs.version.outputs.version }}
8396
build-args: |
97+
IMAGE=${{ needs.version.outputs.dotnet_version }}
8498
GODOT_VERSION=${{ needs.version.outputs.version }}
8599
RELEASE_NAME=${{ needs.version.outputs.release_name }}
86100
ZIP_GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless_64' || 'linux_x86_64' }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ARG GODOT_PLATFORM="linux.x86_64"
3535

3636
RUN wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
3737
&& wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
38-
&& mkdir ~/.cache \
38+
&& mkdir -p ~/.cache \
3939
&& mkdir -p ~/.config/godot \
4040
&& mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
4141
&& unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \

mono.Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM mono:latest
1+
ARG IMAGE="mcr.microsoft.com/dotnet/sdk:8.0-jammy"
2+
FROM $IMAGE
23
LABEL author="https://github.com/aBARICHELLO/godot-ci/graphs/contributors"
34

45
USER root
@@ -8,8 +9,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
89
ca-certificates \
910
git \
1011
git-lfs \
11-
python \
12-
python-openssl \
1312
unzip \
1413
wget \
1514
zip \
@@ -41,7 +40,7 @@ ARG GODOT_ZIP_PLATFORM="linux_x86_64"
4140

4241
RUN wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${GODOT_ZIP_PLATFORM}.zip \
4342
&& wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_export_templates.tpz \
44-
&& mkdir ~/.cache \
43+
&& mkdir -p ~/.cache \
4544
&& mkdir -p ~/.config/godot \
4645
&& mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME}.mono \
4746
&& unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${GODOT_ZIP_PLATFORM}.zip \

0 commit comments

Comments
 (0)