Skip to content

Commit

Permalink
fix not deploying to test
Browse files Browse the repository at this point in the history
  • Loading branch information
mnbf9rca authored Sep 12, 2024
1 parent 65feb79 commit f88fd12
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/deploy_workflow_wrapper.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: build artifact and publish to PyPi

on:
# whenever version is bumped, or allow manual runs
workflow_dispatch:
inputs:
deploy_to_test:
type: boolean
description: 'Deploy to PyPi test'
required: false
default: false

workflow_run:
workflows: ["bump version"]
types:
Expand All @@ -16,23 +17,28 @@ on:
jobs:
build_artifacts:
uses: ./.github/workflows/deploy_build_artifact.yaml
# output:
# artifact-url:
# artifact-id:
# package-version:
# artifact-name:

deploy_to_pypi_test:
needs: [build_artifacts]
if: ${{ github.event.inputs.deploy_to_test == true }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_test == 'true' }}
uses: ./.github/workflows/deploy_to_pypi.yml
with:
package-version: ${{ needs.build_artifacts.outputs.package-version }}
target-environment: 'pypi-test'
artifact-name: ${{ needs.build_artifacts.outputs.artifact-name }}

deploy_to_pypi_prod:
deploy_to_pypi_prod_after_test:
needs: [build_artifacts, deploy_to_pypi_test]
if: ${{ github.event.inputs.deploy_to_test == 'true' }}
uses: ./.github/workflows/deploy_to_pypi.yml
with:
package-version: ${{ needs.build_artifacts.outputs.package-version }}
target-environment: 'pypi-prod'
artifact-name: ${{ needs.build_artifacts.outputs.artifact-name }}

deploy_to_pypi_prod_direct:
needs: [build_artifacts]
if: ${{ github.event.inputs.deploy_to_test != 'true' }}
uses: ./.github/workflows/deploy_to_pypi.yml
with:
package-version: ${{ needs.build_artifacts.outputs.package-version }}
Expand Down

0 comments on commit f88fd12

Please sign in to comment.