Upgrading rlespinasse/github-slug-action to 2.0.0

Closes #58
Also, fixing broken deployment to master
This commit is contained in:
David Négrier 2020-05-03 18:38:54 +02:00
parent e666fe3fa1
commit 7855ae3a1d
2 changed files with 11 additions and 11 deletions

View file

@ -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"

View file

@ -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": {