Only make the downloads action run if the core action was successful

This commit is contained in:
Patrick Robertson
2025-03-26 15:07:57 +04:00
parent 74974ef0ed
commit 4cfa6455c7

View File

@@ -1,15 +1,23 @@
name: Download Tests
on:
# Schedule this workflow to run every Monday at 14:35 UTC
schedule:
- cron: '35 14 * * 1'
pull_request:
branches: [ main ]
# For PRs, run the tests-core workflow first
workflow_run:
workflows: ["Core Tests"] # This should match the name of your tests-core workflow
types:
- completed
branches: [main]
paths:
- src/**
jobs:
tests:
# Only run if the triggering workflow (tests-core) succeeded
if: ${{ github.event_name == 'schedule' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
@@ -21,6 +29,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# When triggered by workflow_run, we need to check out the PR code
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
- name: Install poetry
run: pipx install poetry