diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 891e7a2d..11533f97 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,6 +5,14 @@ on: jobs: main: + strategy: + matrix: + include: + - unity_docker_image: unityci/editor:2021.3.22f1-webgl-1 + service_name: asset-bundle-converter + - unity_docker_image: unityci/editor:2021.3.22f1-windows-mono-1 + service_name: asset-bundle-converter-windows + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -28,12 +36,14 @@ jobs: with: context: . push: ${{ github.ref == 'refs/heads/main' }} - tags: quay.io/decentraland/asset-bundle-converter:next,quay.io/decentraland/asset-bundle-converter:${{ github.sha }} + tags: quay.io/decentraland/${{ matrix.service_name }}:next,quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }} #load: true cache-from: type=gha cache-to: type=gha,mode=max build-args: | COMMIT_HASH=${{ github.sha }} + UNITY_DOCKER_IMAGE=${{ matrix.unity_docker_image }} + - name: Create $(pwd)/tmp/Unity/Unity_lic.ulf run: mkdir -p $(pwd)/tmp/Unity && echo "$UNITY_2021_ULF" > $(pwd)/tmp/Unity/Unity_lic.ulf @@ -45,14 +55,14 @@ jobs: docker run \ -v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \ -v $(pwd):/app \ - quay.io/decentraland/asset-bundle-converter@${{ steps.docker_build.outputs.digest }} \ + quay.io/decentraland/${{ matrix.service_name }}@${{ steps.docker_build.outputs.digest }} \ sh -c "cd /app ; ls -la ; chmod +x ci-editmode-test.sh ; ./ci-editmode-test.sh" - name: Run test conversion of urn:decentraland:off-chain:base-avatars:brown_pants run: | docker run \ -v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \ - quay.io/decentraland/asset-bundle-converter@${{ steps.docker_build.outputs.digest }} \ + quay.io/decentraland/${{ matrix.service_name }}@${{ steps.docker_build.outputs.digest }} \ node --trace-warnings --abort-on-uncaught-exception --unhandled-rejections=strict dist/test-conversion.js \ --baseUrl https://peer.decentraland.org/content \ --pointer urn:decentraland:off-chain:base-avatars:brown_pants \ @@ -64,7 +74,7 @@ jobs: uses: decentraland/dcl-deploy-action@main if: ${{ github.ref == 'refs/heads/main' }} with: - dockerImage: quay.io/decentraland/asset-bundle-converter:${{ github.sha }} - serviceName: asset-bundle-converter + dockerImage: quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }} + serviceName: ${{ matrix.service_name }} env: dev prd token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index bccedcb4..7a3e3b47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ ARG RUN +ARG UNITY_DOCKER_IMAGE FROM node:18 as builderenv @@ -28,7 +29,7 @@ RUN npm ci --only=production ########################## END OF BUILD STAGE ########################## -FROM unityci/editor:2021.3.22f1-webgl-1 +FROM $UNITY_DOCKER_IMAGE RUN apt-get update -y \ && apt-get -y install \