From 94c4974ae36798d1db28ae39cd353fc824e169da Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Mon, 20 Nov 2023 13:29:39 -0600 Subject: [PATCH] add workflow for branch deploys --- .github/workflows/deploy-branch.yml | 21 +++++++++++++++++++ .../{docker-deploy.yml => deploy-release.yml} | 3 +-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-branch.yml rename .github/workflows/{docker-deploy.yml => deploy-release.yml} (95%) diff --git a/.github/workflows/deploy-branch.yml b/.github/workflows/deploy-branch.yml new file mode 100644 index 0000000000..8b74099aa5 --- /dev/null +++ b/.github/workflows/deploy-branch.yml @@ -0,0 +1,21 @@ +name: Docker Branch Deploy + +on: + pull_request_review: + types: [submitted] + +jobs: + build: + runs-on: ubuntu-latest + if: github.event.review.state == 'APPROVED' && contains(github.event.pull_request.labels.*.name, 'deploy-dev') + steps: + - uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: civitai + repo: civitai-deployment + workflow_file_name: deploy.yml + github_token: ${{ secrets.GHA_WORKFLOW_TRIGGER }} + ref: main + client_payload: | + { "environment": "dev", "branch": "${{ github.ref_name }}" } + wait_workflow: false diff --git a/.github/workflows/docker-deploy.yml b/.github/workflows/deploy-release.yml similarity index 95% rename from .github/workflows/docker-deploy.yml rename to .github/workflows/deploy-release.yml index e3d564f6c0..be2781e233 100644 --- a/.github/workflows/docker-deploy.yml +++ b/.github/workflows/deploy-release.yml @@ -1,4 +1,4 @@ -name: Docker Deploy +name: Docker Release Deploy on: push: @@ -8,7 +8,6 @@ on: jobs: build: - runs-on: ubuntu-latest steps: