diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ce186cec..9e22dedc 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,7 +1,11 @@ name: Build, push and deploy Docker image on: - - push + release: + types: [created] + pull_request: + types: [ labeled, synchronize ] + # Enables BuildKit env: @@ -10,7 +14,7 @@ env: jobs: build-front: - + if: ${{ github.event.release || contains(github.event.pull_request.labels.*.name, 'deploy') }} runs-on: ubuntu-latest steps: @@ -30,11 +34,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-front - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ github.event.pull_request && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} add_git_labels: true build-back: - + if: ${{ github.event.release || contains(github.event.pull_request.labels.*.name, 'deploy') }} runs-on: ubuntu-latest steps: @@ -53,11 +57,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-back - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ github.event.pull_request && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} add_git_labels: true build-pusher: - + if: ${{ github.event.release || contains(github.event.pull_request.labels.*.name, 'deploy') }} runs-on: ubuntu-latest steps: @@ -76,11 +80,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-pusher - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ github.event.pull_request && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} add_git_labels: true build-uploader: - + if: ${{ github.event.release || contains(github.event.pull_request.labels.*.name, 'deploy') }} runs-on: ubuntu-latest steps: @@ -99,11 +103,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-uploader - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ github.event.pull_request && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} add_git_labels: true build-maps: - + if: ${{ github.event.release || contains(github.event.pull_request.labels.*.name, 'deploy') }} runs-on: ubuntu-latest steps: @@ -123,7 +127,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-maps - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ github.event.pull_request && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} add_git_labels: true deeploy: @@ -134,6 +138,7 @@ jobs: - build-maps - build-uploader runs-on: ubuntu-latest + if: ${{ contains(github.event.pull_request.labels.*.name, 'deploy') }} steps: - name: Checkout @@ -151,14 +156,14 @@ jobs: JITSI_URL: ${{ secrets.JITSI_URL }} SECRET_JITSI_KEY: ${{ secrets.SECRET_JITSI_KEY }} TURN_STATIC_AUTH_SECRET: ${{ secrets.TURN_STATIC_AUTH_SECRET }} + DEPLOY_REF: ${{ env.GITHUB_HEAD_REF_SLUG }} with: - namespace: workadventure-${{ env.GITHUB_REF_SLUG }} + namespace: workadventure-${{ env.GITHUB_HEAD_REF_SLUG }} - name: Add a comment in PR uses: unsplash/comment-on-pr@v1.2.0 - if: ${{ env.GITHUB_REF_SLUG != 'master' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - msg: Environment deployed at https://play.${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + msg: Environment deployed at https://play.${{ env.GITHUB_HEAD_REF_SLUG }}.test.workadventu.re check_for_duplicate_msg: true diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index bb6bcc89..ffa8273f 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -1,7 +1,8 @@ name: Cleanup images and environments on: - - delete + pull_request: + types: [ closed ] # Enables BuildKit env: @@ -14,13 +15,12 @@ jobs: steps: # Create a slugified value of the branch - - uses: rlespinasse/github-slug-action@1.1.0 + - uses: rlespinasse/github-slug-action@3.1.0 - name: Cleanup + continue-on-error: true uses: thecodingmachine/deeployer-cleanup-action@master env: KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }} with: -# FIXME: we are not using ${{ env.GITHUB_REF_SLUG }} that resolves to master BUT! we are not using a slugified namespace -# so complex namespace names will not be treated correctly - namespace: workadventure-${{ github.event.ref }} + namespace: workadventure-${{ env.GITHUB_HEAD_REF_SLUG }} diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 607dbf79..38d8c8f0 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -3,8 +3,11 @@ name: "Continuous Integration" on: - - "pull_request" - - "push" + push: + branches: + - master + - develop + pull_request: jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..93940b0c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +## Version 1.3.0 - in dev + +### New Features + +* Maps can now contain "group" layers (layers that contain other layers) - #899 #779 (@Lurkars @moufmouf) + +### Updates + + +### Bug Fixes diff --git a/README.md b/README.md index c6facad3..322f06ba 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Install Docker. Run: ``` -docker-compose up +docker-compose up -d ``` The environment will start. diff --git a/deeployer.libsonnet b/deeployer.libsonnet index 07506f11..7ed9db8c 100644 --- a/deeployer.libsonnet +++ b/deeployer.libsonnet @@ -1,8 +1,8 @@ { local env = std.extVar("env"), - local namespace = env.GITHUB_REF_SLUG, + local namespace = env.DEPLOY_REF, local tag = namespace, - local url = if namespace == "master" then "workadventu.re" else namespace+".workadventure.test.thecodingmachine.com", + local url = if namespace == "master" then "workadventu.re" else namespace+".test.workadventu.re", // develop branch does not use admin because of issue with SSL certificate of admin as of now. local adminUrl = if namespace == "master" || namespace == "develop" || std.startsWith(namespace, "admin") then "https://"+url else null, "$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json", diff --git a/docker-compose.single-domain.yaml b/docker-compose.single-domain.yaml index 01937bc7..28bc0130 100644 --- a/docker-compose.single-domain.yaml +++ b/docker-compose.single-domain.yaml @@ -30,7 +30,8 @@ services: UPLOADER_URL: /uploader ADMIN_URL: /admin MAPS_URL: /maps - STARTUP_COMMAND_1: yarn install + STARTUP_COMMAND_1: ./templater.sh + STARTUP_COMMAND_2: yarn install TURN_SERVER: "turn:localhost:3478,turns:localhost:5349" # Use TURN_USER/TURN_PASSWORD if your Coturn server is secured via hard coded credentials. # Advice: you should instead use Coturn REST API along the TURN_STATIC_AUTH_SECRET in the Back container diff --git a/front/dist/index.tmpl.html b/front/dist/index.tmpl.html index 062622b8..c4763b6e 100644 --- a/front/dist/index.tmpl.html +++ b/front/dist/index.tmpl.html @@ -48,20 +48,27 @@
+
+ + + + + +
-
- - +
+ +
-
- - +
+ +
diff --git a/front/dist/resources/html/CustomCharacterScene.html b/front/dist/resources/html/CustomCharacterScene.html new file mode 100644 index 00000000..0bc050ea --- /dev/null +++ b/front/dist/resources/html/CustomCharacterScene.html @@ -0,0 +1,160 @@ + + + diff --git a/front/dist/resources/html/EnableCameraScene.html b/front/dist/resources/html/EnableCameraScene.html new file mode 100644 index 00000000..2dda6cc1 --- /dev/null +++ b/front/dist/resources/html/EnableCameraScene.html @@ -0,0 +1,129 @@ + + + diff --git a/front/dist/resources/html/SelectCompanionScene.html b/front/dist/resources/html/SelectCompanionScene.html new file mode 100644 index 00000000..cffa7880 --- /dev/null +++ b/front/dist/resources/html/SelectCompanionScene.html @@ -0,0 +1,134 @@ + + + diff --git a/front/dist/resources/html/gameMenu.html b/front/dist/resources/html/gameMenu.html index ce740ec5..6abf2753 100644 --- a/front/dist/resources/html/gameMenu.html +++ b/front/dist/resources/html/gameMenu.html @@ -1,4 +1,10 @@