diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index d6ec1acd..5c09de3e 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -32,7 +32,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-front - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_HEAD_REF_SLUG }} add_git_labels: true build-back: @@ -55,7 +55,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-back - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_HEAD_REF_SLUG }} add_git_labels: true build-pusher: @@ -78,7 +78,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-pusher - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_HEAD_REF_SLUG }} add_git_labels: true build-uploader: @@ -101,7 +101,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-uploader - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_HEAD_REF_SLUG }} add_git_labels: true build-maps: @@ -125,7 +125,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-maps - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_HEAD_REF_SLUG }} add_git_labels: true deeploy: @@ -154,13 +154,13 @@ jobs: SECRET_JITSI_KEY: ${{ secrets.SECRET_JITSI_KEY }} TURN_STATIC_AUTH_SECRET: ${{ secrets.TURN_STATIC_AUTH_SECRET }} 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' }} + if: ${{ env.GITHUB_HEAD_REF_SLUG != 'master' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - msg: Environment deployed at https://play.${{ env.GITHUB_REF_SLUG }}.test.workadventu.re + 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 558a2c3e..ab39978b 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -15,13 +15,11 @@ 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 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/deeployer.libsonnet b/deeployer.libsonnet index 3eeaa359..f94f4e69 100644 --- a/deeployer.libsonnet +++ b/deeployer.libsonnet @@ -1,6 +1,6 @@ { local env = std.extVar("env"), - local namespace = env.GITHUB_REF_SLUG, + local namespace = env.GITHUB_HEAD_REF_SLUG, local tag = namespace, 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. diff --git a/front/dist/index.tmpl.html b/front/dist/index.tmpl.html index b381c0fb..a81c283c 100644 --- a/front/dist/index.tmpl.html +++ b/front/dist/index.tmpl.html @@ -49,15 +49,15 @@