diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 88bd4543..af1b03ff 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -20,7 +20,7 @@ jobs: # Create a slugified value of the branch - - uses: rlespinasse/github-slug-action@master + - uses: rlespinasse/github-slug-action@2.0.0 - name: "Build and push front image" uses: docker/build-push-action@v1 @@ -30,7 +30,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-front - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_REF_SLUG_URL }} add_git_labels: true build-back: @@ -43,7 +43,7 @@ jobs: uses: actions/checkout@v2 # Create a slugified value of the branch - - uses: rlespinasse/github-slug-action@master + - uses: rlespinasse/github-slug-action@2.0.0 - name: "Build and push back image" uses: docker/build-push-action@v1 @@ -53,7 +53,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} repository: thecodingmachine/workadventure-back - tags: ${{ env.GITHUB_REF_SLUG }} + tags: ${{ env.GITHUB_REF_SLUG_URL }} add_git_labels: true deeploy: @@ -74,24 +74,24 @@ jobs: env: KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }} with: - namespace: workadventure-${{ env.GITHUB_REF_SLUG }} + namespace: workadventure-${{ env.GITHUB_REF_SLUG_URL }} - name: Add a comment in PR uses: unsplash/comment-on-pr@v1.2.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - msg: Environment deployed at https://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + msg: Environment deployed at https://${{ env.GITHUB_REF_SLUG_URL }}.workadventure.test.thecodingmachine.com check_for_duplicate_msg: true - name: Run Cypress tests uses: cypress-io/github-action@v1 env: - CYPRESS_BASE_URL: https://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + CYPRESS_BASE_URL: https://${{ env.GITHUB_REF_SLUG_URL }}.workadventure.test.thecodingmachine.com with: - env: host=${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com,port=80 + env: host=${{ env.GITHUB_REF_SLUG_URL }}.workadventure.test.thecodingmachine.com,port=80 spec: cypress/integration/spec.js - wait-on: https://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + wait-on: https://${{ env.GITHUB_REF_SLUG_URL }}.workadventure.test.thecodingmachine.com working-directory: e2e - name: "Upload the screenshot on test failure" diff --git a/deeployer.libsonnet b/deeployer.libsonnet index 84ea3eca..47508b2f 100644 --- a/deeployer.libsonnet +++ b/deeployer.libsonnet @@ -1,7 +1,7 @@ { local env = std.extVar("env"), - local namespace = env.GITHUB_REF_SLUG, - local tag = if namespace == "master" then "latest" else namespace, + local namespace = env.GITHUB_REF_SLUG_URL, + local tag = namespace, "$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json", "containers": { "back": {