diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index ba42549..3d3ce40 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -8,7 +8,7 @@ on: jobs: fetch: name: Fetch Latest Godot Engine Release - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: release_tag: ${{ steps.parse.outputs.tag }} steps: @@ -20,7 +20,7 @@ jobs: echo "tag=$TAG" >> $GITHUB_OUTPUT current: name: Fetch Current Godot CI release - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: release_tag: ${{ steps.parse.outputs.tag }} steps: @@ -32,7 +32,7 @@ jobs: create: needs: [fetch, current] name: Create New Godot CI Release - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: needs.fetch.outputs.release_tag != needs.current.outputs.release_tag steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/godot-ci.yml b/.github/workflows/godot-ci.yml index 20869b4..a0254b5 100644 --- a/.github/workflows/godot-ci.yml +++ b/.github/workflows/godot-ci.yml @@ -11,7 +11,7 @@ env: jobs: export-windows: name: Windows Export - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 # Use 22.04 with godot 4 container: image: barichello/godot-ci:4.3 steps: @@ -39,7 +39,7 @@ jobs: export-linux: name: Linux Export - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 # Use 22.04 with godot 4 container: image: barichello/godot-ci:4.3 steps: @@ -65,7 +65,7 @@ jobs: export-web: name: Web Export - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 # Use 22.04 with godot 4 container: image: barichello/godot-ci:4.3 steps: @@ -99,7 +99,7 @@ jobs: export-mac: name: Mac Export - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 # Use 22.04 with godot 4 container: image: barichello/godot-ci:4.3 steps: diff --git a/.github/workflows/manual_build.yml b/.github/workflows/manual_build.yml index afd9051..0fb9748 100644 --- a/.github/workflows/manual_build.yml +++ b/.github/workflows/manual_build.yml @@ -14,9 +14,29 @@ on: env: IMAGE_NAME: godot-ci jobs: + version: + name: Get Version + runs-on: ubuntu-22.04 + outputs: + dotnet_version: ${{ steps.calculate.outputs.dotnet_version }} + steps: + - id: calculate + run: | + MAJOR_VERSION=$(echo ${{ github.event.inputs.version }} | cut -c -1) + MINOR_VERSION=$(echo ${{ github.event.inputs.version }} | cut -c -3) + if [ "$MAJOR_VERSION" = "3" ] + then + echo "dotnet_version=mono:latest" >> $GITHUB_OUTPUT + elif [ "$MINOR_VERSION" = "4.0" ] || [ "$MINOR_VERSION" = "4.1" ] || [ "$MINOR_VERSION" = "4.2" ] || [ "$MINOR_VERSION" = "4.3" ] + then + echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:6.0-jammy" >> $GITHUB_OUTPUT + else + echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:8.0-jammy" >> $GITHUB_OUTPUT + fi + build: name: Build Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV @@ -49,7 +69,8 @@ jobs: GODOT_PLATFORM=${{ startsWith( github.event.inputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }} build-mono: name: Build Mono Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 + needs: [version] steps: - uses: actions/checkout@v3 - run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV @@ -75,6 +96,7 @@ jobs: ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:mono-${{ github.event.inputs.version }}${{ env.IMAGE_TAG }} ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-${{ github.event.inputs.version }}${{ env.IMAGE_TAG }} build-args: | + IMAGE=${{ needs.version.outputs.dotnet_version }} GODOT_VERSION=${{ github.event.inputs.version }} RELEASE_NAME=${{ github.event.inputs.release_name }} SUBDIR=${{ github.event.inputs.release_name != 'stable' && format('/{0}', github.event.inputs.release_name) || '' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6521427..3e2c8e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,19 +7,32 @@ env: jobs: version: name: Get Version - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: version: ${{ steps.calculate.outputs.version }} release_name: ${{ steps.calculate.outputs.release_name }} + dotnet_version: ${{ steps.calculate.outputs.dotnet_version }} steps: - id: calculate run: | REF_NAME=${{ github.ref_name }} echo "version=${REF_NAME%-*}" >> $GITHUB_OUTPUT echo "release_name=${REF_NAME#*-}" >> $GITHUB_OUTPUT + MAJOR_VERSION=$(echo ${REF_NAME%-*} | cut -c -1) + MINOR_VERSION=$(echo ${REF_NAME%-*} | cut -c -3) + if [ "$MAJOR_VERSION" = "3" ] + then + echo "dotnet_version=mono:latest" >> $GITHUB_OUTPUT + elif [ "$MINOR_VERSION" = "4.0" ] || [ "$MINOR_VERSION" = "4.1" ] || [ "$MINOR_VERSION" = "4.2" ] || [ "$MINOR_VERSION" = "4.3" ] + then + echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:6.0-jammy" >> $GITHUB_OUTPUT + else + echo "dotnet_version=mcr.microsoft.com/dotnet/sdk:8.0-jammy" >> $GITHUB_OUTPUT + fi + build: name: Build Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [version] steps: - uses: actions/checkout@v3 @@ -53,7 +66,7 @@ jobs: GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless.64' || 'linux.x86_64' }} build-mono: name: Build Mono Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [version] steps: - uses: actions/checkout@v3 @@ -81,6 +94,7 @@ jobs: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-latest ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-${{ needs.version.outputs.version }} build-args: | + IMAGE=${{ needs.version.outputs.dotnet_version }} GODOT_VERSION=${{ needs.version.outputs.version }} RELEASE_NAME=${{ needs.version.outputs.release_name }} ZIP_GODOT_PLATFORM=${{ startsWith( needs.version.outputs.version, '3.' ) && 'linux_headless_64' || 'linux_x86_64' }} diff --git a/Dockerfile b/Dockerfile index d99691d..76c1663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ ARG GODOT_PLATFORM="linux.x86_64" RUN wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \ && wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \ - && mkdir ~/.cache \ + && mkdir -p ~/.cache \ && mkdir -p ~/.config/godot \ && mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \ && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \ diff --git a/mono.Dockerfile b/mono.Dockerfile index 6b78452..08c8990 100644 --- a/mono.Dockerfile +++ b/mono.Dockerfile @@ -1,4 +1,5 @@ -FROM mono:latest +ARG IMAGE="mcr.microsoft.com/dotnet/sdk:8.0-jammy" +FROM $IMAGE LABEL author="https://github.com/aBARICHELLO/godot-ci/graphs/contributors" USER root @@ -8,8 +9,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ git \ git-lfs \ - python \ - python-openssl \ unzip \ wget \ zip \ @@ -41,7 +40,7 @@ ARG GODOT_ZIP_PLATFORM="linux_x86_64" 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 \ && wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_export_templates.tpz \ - && mkdir ~/.cache \ + && mkdir -p ~/.cache \ && mkdir -p ~/.config/godot \ && mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME}.mono \ && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_mono_${GODOT_ZIP_PLATFORM}.zip \