Skip to content

Commit

Permalink
chore: fix deploy action's job execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizzonium committed Nov 9, 2023
1 parent 6195911 commit c138227
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,27 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: [Main, Secondary, Vega, Cleo, Prime, WL, Tutorial]
environment: [Main, Vega, Cleo, Prime, WL, Tutorial]
environment: ${{ matrix.environment }}
needs: [update-isp-lists, CI]
if: always() && !cancelled() && !failure()

steps:
- uses: chrnorm/deployment-action@v2
- name: Early exit
if: |
(matrix.environment == 'Main' && inputs.perform_deploy_main) ||
(matrix.environment == 'Vega' && inputs.perform_deploy_vega) ||
(matrix.environment == 'Cleo' && inputs.perform_deploy_cleo) ||
(matrix.environment == 'Prime' && inputs.perform_deploy_prime) ||
(matrix.environment == 'WL' && inputs.perform_deploy_wl) ||
(matrix.environment == 'Tutorial' && inputs.perform_deploy_tutorial)
(matrix.environment == 'Main' && !inputs.perform_deploy_main) ||
(matrix.environment == 'Vega' && !inputs.perform_deploy_vega) ||
(matrix.environment == 'Cleo' && !inputs.perform_deploy_cleo) ||
(matrix.environment == 'Prime' && !inputs.perform_deploy_prime) ||
(matrix.environment == 'WL' && !inputs.perform_deploy_wl) ||
(matrix.environment == 'Tutorial' && !inputs.perform_deploy_tutorial)
run: |
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: chrnorm/deployment-action@v2
name: Create GitHub deployment
id: deployment
with:
Expand Down Expand Up @@ -177,13 +184,7 @@ jobs:
- name: Update deployment status (success)
if: |
success() && (
(matrix.environment == 'Main' && inputs.perform_deploy_main) ||
(matrix.environment == 'Vega' && inputs.perform_deploy_vega) ||
(matrix.environment == 'Cleo' && inputs.perform_deploy_cleo) ||
(matrix.environment == 'Prime' && inputs.perform_deploy_prime) ||
(matrix.environment == 'WL' && inputs.perform_deploy_wl) ||
(matrix.environment == 'Tutorial' && inputs.perform_deploy_tutorial))
success()
uses: chrnorm/deployment-status@v2
with:
token: "${{ github.token }}"
Expand All @@ -192,13 +193,7 @@ jobs:

- name: Update deployment status (failure)
if: |
failure() && (
(matrix.environment == 'Main' && inputs.perform_deploy_main) ||
(matrix.environment == 'Vega' && inputs.perform_deploy_vega) ||
(matrix.environment == 'Cleo' && inputs.perform_deploy_cleo) ||
(matrix.environment == 'Prime' && inputs.perform_deploy_prime) ||
(matrix.environment == 'WL' && inputs.perform_deploy_wl) ||
(matrix.environment == 'Tutorial' && inputs.perform_deploy_tutorial))
failure()
uses: chrnorm/deployment-status@v2
with:
token: "${{ github.token }}"
Expand Down

0 comments on commit c138227

Please sign in to comment.