Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

dx(platform): Add manual dispatch to deploy workflows (#10918)

Reinier van der Leer4c0dd27157f8
diff --git a/.github/workflows/platform-autogpt-deploy-dev.yaml b/.github/workflows/platform-autogpt-deploy-dev.yaml
index 44da8641ec..6e1e23d3eb 100644
--- a/.github/workflows/platform-autogpt-deploy-dev.yaml
+++ b/.github/workflows/platform-autogpt-deploy-dev.yaml
@@ -5,6 +5,13 @@ on:
branches: [ dev ]
paths:
- 'autogpt_platform/**'
+ workflow_dispatch:
+ inputs:
+ git_ref:
+ description: 'Git ref (branch/tag) of AutoGPT to deploy'
+ required: true
+ default: 'master'
+ type: string
permissions:
contents: 'read'
@@ -19,6 +26,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.inputs.git_ref || github.ref_name }}
- name: Set up Python
uses: actions/setup-python@v5
@@ -48,4 +57,4 @@ jobs:
token: ${{ secrets.DEPLOY_TOKEN }}
repository: Significant-Gravitas/AutoGPT_cloud_infrastructure
event-type: build_deploy_dev
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "repository": "${{ github.repository }}"}'
+ client-payload: '{"ref": "${{ github.event.inputs.git_ref || github.ref }}", "repository": "${{ github.repository }}"}'
diff --git a/.github/workflows/platform-autgpt-deploy-prod.yml b/.github/workflows/platform-autogpt-deploy-prod.yml
similarity index 84%
rename from .github/workflows/platform-autgpt-deploy-prod.yml
rename to .github/workflows/platform-autogpt-deploy-prod.yml
index d0a8210253..4d7c16d710 100644
--- a/.github/workflows/platform-autgpt-deploy-prod.yml
+++ b/.github/workflows/platform-autogpt-deploy-prod.yml
@@ -3,6 +3,7 @@ name: AutoGPT Platform - Deploy Prod Environment
on:
release:
types: [published]
+ workflow_dispatch:
permissions:
contents: 'read'
@@ -17,6 +18,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ ref: ${{ github.ref_name || 'master' }}
- name: Set up Python
uses: actions/setup-python@v5
@@ -36,7 +39,7 @@ jobs:
DATABASE_URL: ${{ secrets.BACKEND_DATABASE_URL }}
DIRECT_URL: ${{ secrets.BACKEND_DATABASE_URL }}
-
+
trigger:
needs: migrate
runs-on: ubuntu-latest
@@ -47,4 +50,5 @@ jobs:
token: ${{ secrets.DEPLOY_TOKEN }}
repository: Significant-Gravitas/AutoGPT_cloud_infrastructure
event-type: build_deploy_prod
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "repository": "${{ github.repository }}"}'
\ No newline at end of file
+ client-payload: |
+ {"ref": "${{ github.ref_name || 'master' }}", "repository": "${{ github.repository }}"}