Skip to content

Commit

Permalink
ci: prevent duplicate wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Jun 13, 2024
1 parent 5253c3c commit e3a80de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/build-explorer.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
name: Build Explorer UI

on:
push:
branches:
- master
pull_request:
workflow_run:
workflows:
- "Build WASM"
types:
- completed

permissions:
contents: read

jobs:
build-wasm:
name: Build WASM
uses: ./.github/workflows/build-wasm.yml

build_explorer:
runs-on: ubuntu-latest
needs: build-wasm
permissions:
actions: read
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand Down Expand Up @@ -57,6 +55,7 @@ jobs:
with:
name: wasm
path: ui/
run-id: ${{ github.event.workflow_run.id }}

- name: Build
working-directory: ./ui
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/tests-ui.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Tests UI

on:
push:
branches:
- master
pull_request:
workflow_run:
workflows:
- "Build WASM"
types:
- completed

permissions: read-all
permissions:
contents: read

jobs:
build-wasm:
name: Build WASM
uses: ./.github/workflows/build-wasm.yml

tests_ui:
name: Tests on UI
runs-on: ubuntu-latest
needs: build-wasm
permissions:
contents: write
checks: write
actions: read
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down Expand Up @@ -60,6 +58,7 @@ jobs:
with:
name: wasm
path: ui/
run-id: ${{ github.event.workflow_run.id }}

- name: Run tests
working-directory: ./ui
Expand Down

0 comments on commit e3a80de

Please sign in to comment.