Skip to content

Commit

Permalink
feat: build image for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm committed Jun 22, 2023
1 parent 2dbb3e1 commit cb5d9b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -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 }}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG RUN
ARG UNITY_DOCKER_IMAGE

FROM node:18 as builderenv

Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit cb5d9b3

Please sign in to comment.