diff --git a/actions/build_deploy_python_executable/action.yml b/actions/build_deploy_python_executable/action.yml index 08d6720..5fe8895 100644 --- a/actions/build_deploy_python_executable/action.yml +++ b/actions/build_deploy_python_executable/action.yml @@ -8,6 +8,10 @@ inputs: description: 'Python version string, major.minor only, eg "3.8"' required: false default: '3.8' + deployment: + required: false + description: "The deployment to push to, defaults to 'prod'. Ignored for pull requests where the branch deployment is used." + default: "prod" deploy: description: 'Whether to upload the code files and update the code location' required: false @@ -61,6 +65,7 @@ runs: - if: ${{ inputs.deploy == 'true' }} run: > cd $ACTION_REPO && + INPUT_DEPLOYMENT=${{ inputs.deployment }} /usr/bin/python src/deploy_pex.py ${{ inputs.dagster_cloud_file }} --python-version=${{ inputs.python_version }} diff --git a/src/deploy_pex.py b/src/deploy_pex.py index 42c305a..207b424 100755 --- a/src/deploy_pex.py +++ b/src/deploy_pex.py @@ -33,8 +33,9 @@ def main(): project_dir = os.path.dirname(dagster_cloud_yaml) deployment_name = get_branch_deployment_name(project_dir) else: - print("Going to do a full deployment.", flush=True) - deployment_name = None + # INPUT_DEPLOYMENT is to the `deployment:` input value in action.yml + deployment_name = os.getenv("INPUT_DEPLOYMENT", "prod") + print(f"Deploying to a full deployment: {deployment_name}", flush=True) ubuntu_version = get_runner_ubuntu_version() print("Running on Ubuntu", ubuntu_version, flush=True)