Upgrading rlespinasse/github-slug-action to 2.0.0
Closes #58 Also, fixing broken deployment to master
This commit is contained in:
parent
e666fe3fa1
commit
7855ae3a1d
2 changed files with 11 additions and 11 deletions
18
.github/workflows/build-and-deploy.yml
vendored
18
.github/workflows/build-and-deploy.yml
vendored
|
@ -20,7 +20,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
# Create a slugified value of the branch
|
# 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"
|
- name: "Build and push front image"
|
||||||
uses: docker/build-push-action@v1
|
uses: docker/build-push-action@v1
|
||||||
|
@ -30,7 +30,7 @@ jobs:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
repository: thecodingmachine/workadventure-front
|
repository: thecodingmachine/workadventure-front
|
||||||
tags: ${{ env.GITHUB_REF_SLUG }}
|
tags: ${{ env.GITHUB_REF_SLUG_URL }}
|
||||||
add_git_labels: true
|
add_git_labels: true
|
||||||
|
|
||||||
build-back:
|
build-back:
|
||||||
|
@ -43,7 +43,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# Create a slugified value of the branch
|
# 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"
|
- name: "Build and push back image"
|
||||||
uses: docker/build-push-action@v1
|
uses: docker/build-push-action@v1
|
||||||
|
@ -53,7 +53,7 @@ jobs:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
repository: thecodingmachine/workadventure-back
|
repository: thecodingmachine/workadventure-back
|
||||||
tags: ${{ env.GITHUB_REF_SLUG }}
|
tags: ${{ env.GITHUB_REF_SLUG_URL }}
|
||||||
add_git_labels: true
|
add_git_labels: true
|
||||||
|
|
||||||
deeploy:
|
deeploy:
|
||||||
|
@ -74,24 +74,24 @@ jobs:
|
||||||
env:
|
env:
|
||||||
KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }}
|
KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }}
|
||||||
with:
|
with:
|
||||||
namespace: workadventure-${{ env.GITHUB_REF_SLUG }}
|
namespace: workadventure-${{ env.GITHUB_REF_SLUG_URL }}
|
||||||
|
|
||||||
- name: Add a comment in PR
|
- name: Add a comment in PR
|
||||||
uses: unsplash/comment-on-pr@v1.2.0
|
uses: unsplash/comment-on-pr@v1.2.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
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
|
check_for_duplicate_msg: true
|
||||||
|
|
||||||
- name: Run Cypress tests
|
- name: Run Cypress tests
|
||||||
uses: cypress-io/github-action@v1
|
uses: cypress-io/github-action@v1
|
||||||
env:
|
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:
|
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
|
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
|
working-directory: e2e
|
||||||
|
|
||||||
- name: "Upload the screenshot on test failure"
|
- name: "Upload the screenshot on test failure"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
local env = std.extVar("env"),
|
local env = std.extVar("env"),
|
||||||
local namespace = env.GITHUB_REF_SLUG,
|
local namespace = env.GITHUB_REF_SLUG_URL,
|
||||||
local tag = if namespace == "master" then "latest" else namespace,
|
local tag = namespace,
|
||||||
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
"$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json",
|
||||||
"containers": {
|
"containers": {
|
||||||
"back": {
|
"back": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue