Skip to content

Commit

Permalink
Refine GitHub Actions workflow conditions for multi-platform deployment
Browse files Browse the repository at this point in the history
- Updated job conditions to improve handling of workflow events, specifically for 'workflow_run' scenarios.
- Enhanced failure handling in the CI job by explicitly exiting with an error code.
- Adjusted the 'information' job to trigger on additional event types, ensuring better integration with release processes.
- Streamlined conditions for the 'publish_addon' job to ensure it only runs when all dependencies succeed.

These changes enhance the robustness and reliability of the deployment process.
  • Loading branch information
maslyankov committed Jan 22, 2025
1 parent 0fc7868 commit e78bcb7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/deploy-multi-mp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ env:
jobs:
ci-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
if: |
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'failure'
steps:
- run: echo 'CI failed'
- run: exit 1

information:
name: Gather add-on information
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'release' }}
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'release' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
outputs:
architectures: ${{ steps.information.outputs.architectures }}
build: ${{ steps.information.outputs.build }}
Expand Down Expand Up @@ -182,6 +189,10 @@ jobs:
needs:
- information
- build
if: |
always() &&
needs.information.result == 'success' &&
needs.build.result != 'failure'
steps:
- name: Download digests
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -267,6 +278,11 @@ jobs:
publish_addon:
name: 🆕 Update addon version to ${{ needs.information.outputs.version }}
needs: [information, build, merge]
if: |
always() &&
needs.information.result == 'success' &&
needs.build.result != 'failure' &&
needs.merge.result == 'success'
permissions:
contents: write
runs-on: ubuntu-latest
Expand Down

0 comments on commit e78bcb7

Please # to comment.