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 0159fa67..ab39978b 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -22,4 +22,4 @@ jobs: env: KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }} with: - namespace: workadventure-${{ env.GITHUB_REF_SLUG }} + 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.