Skip to content

Commit

Permalink
Run build workflow conditionally and fix setup job
Browse files Browse the repository at this point in the history
  • Loading branch information
mmounirf committed Mar 28, 2024
1 parent 5b25073 commit 147ffc6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Build

on:
push:
branches: [ "main" ]
workflow_run:
workflows: ["Code quality"]
types:
- completed

workflow_dispatch:

Expand All @@ -11,16 +13,24 @@ concurrency:
cancel-in-progress: true

jobs:
setup:

on-code-quality-failure:
runs-on: ubuntu-latest

if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'Code quality workflow failed, skipping build'

setup:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
Expand Down

0 comments on commit 147ffc6

Please sign in to comment.