partey_workadventure/.github/workflows/build-and-deploy.yml

69 lines
1.4 KiB
YAML
Raw Normal View History

2020-04-09 11:00:30 +02:00
name: Build, push and deploy Docker image
on:
push:
branches:
- master
- cd
# tags:
# - '*'
# Enables BuildKit
env:
DOCKER_BUILDKIT: 1
jobs:
build-front:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Build and push front image"
uses: docker/build-push-action@v1
with:
2020-04-09 11:56:29 +02:00
dockerfile: front/Dockerfile
2020-04-09 11:00:30 +02:00
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: thecodingmachine/workadventure-front
tag_with_ref: true
add_git_labels: true
build-back:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Build and push back image"
uses: docker/build-push-action@v1
with:
2020-04-09 11:56:29 +02:00
dockerfile: back/Dockerfile
2020-04-09 11:00:30 +02:00
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: thecodingmachine/workadventure-back
tag_with_ref: true
add_git_labels: true
deeploy:
needs:
- build-front
- build-back
runs-on: ubuntu-latest
2020-04-09 11:03:24 +02:00
steps:
2020-04-09 11:00:30 +02:00
- name: Checkout
uses: actions/checkout@v2
2020-04-09 12:14:06 +02:00
- name: Deploy
2020-04-09 11:00:30 +02:00
uses: thecodingmachine/deeployer@master
2020-04-09 12:14:06 +02:00
with:
namespace: workadventure-${GITHUB_REF#refs/heads/}