From 15347ffd91d45cf9c3ad23ddeef26490570d3426 Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Tue, 23 Mar 2021 16:22:05 -0400 Subject: [PATCH] Splitting out dev and master deployments --- .../workflows/{deploy.yml => deploy_beta.yml} | 3 +- .github/workflows/deploy_prod.yml | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) rename .github/workflows/{deploy.yml => deploy_beta.yml} (93%) create mode 100644 .github/workflows/deploy_prod.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy_beta.yml similarity index 93% rename from .github/workflows/deploy.yml rename to .github/workflows/deploy_beta.yml index b783dbd7..f52ceb02 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy_beta.yml @@ -3,7 +3,6 @@ name: Deploy MYR on: push: branches: - - master - dev jobs: @@ -25,5 +24,5 @@ jobs: uses: peter-evans/repository-dispatch@v1 with: token: ${{ secrets.MYR_ACCESS_TOKEN }} - event-type: update_${BRANCH_NAME} + event-type: update_dev repository: engaging-computing/MYR-build \ No newline at end of file diff --git a/.github/workflows/deploy_prod.yml b/.github/workflows/deploy_prod.yml new file mode 100644 index 00000000..543abc04 --- /dev/null +++ b/.github/workflows/deploy_prod.yml @@ -0,0 +1,28 @@ +name: Deploy production MYR + +on: + push: + branches: + - master + +jobs: + update_upstream: + runs-on: ubuntu-latest + container: + image: docker + steps: + - uses: actions/checkout@v1 + - name: Set the branch variable + uses: nelonoel/branch-name@v1.0.1 + - name: Log into Quay + run: docker login quay.io -u umlecg+myr_bot -p ${{ secrets.QUAY_BOT_PASSWORD }} + - name: Build the docker image + run: docker build -t quay.io/umlecg/myr-backend:${BRANCH_NAME} . + - name: Push the new image + run: docker push quay.io/umlecg/myr-backend:${BRANCH_NAME} + - name: Notify the build repository + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.MYR_ACCESS_TOKEN }} + event-type: update_master + repository: engaging-computing/MYR-build \ No newline at end of file