From ec3e8ab1561689ba136af6420acf2f9b500976fa Mon Sep 17 00:00:00 2001 From: Leonid Tsarev Date: Thu, 11 Jan 2024 20:09:36 +0300 Subject: [PATCH] add auto deploy --- .github/workflows/deploy_dev.yml | 4 ++++ .github/workflows/deploy_dev_auto.yml | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/deploy_dev_auto.yml diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 242612d..1b13bc6 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -7,6 +7,10 @@ on: required: true default: latest +concurrency: + group: development + cancel-in-progress: true + jobs: deploy: permissions: read-all diff --git a/.github/workflows/deploy_dev_auto.yml b/.github/workflows/deploy_dev_auto.yml new file mode 100644 index 0000000..45bebdb --- /dev/null +++ b/.github/workflows/deploy_dev_auto.yml @@ -0,0 +1,21 @@ +name: Deploy to dev +on: + workflow_run: + workflows: [Build and publish] + types: [completed] + branches: [master] + +concurrency: + group: development + cancel-in-progress: true + +jobs: + deploy: + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master' }} + permissions: read-all + uses: ./.github/workflows/deploy_reusable_workflow.yml + with: + deployVersion: latest + environment: kogda-dev + environment_url: https://dev.kogra-igra.ru + secrets: inherit